Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am currently using Codeignitor as my PHP framework with XAMPP. I always keep all my files in c:/xampp/htdocs/.

The settings are working fine in my own localhost machine. But when I load the same project in other machines connected via a router only the hypertext that is within the Codeignitor framework i.e inside application and system folder are getting displayed. But the external sources like stylesheets, images are not being displayed.

On other machines I can access the project via the following URL.

http://my_ip/project_route

And on my own machine I can access it via http://localhost/project_route

But the strange thing is that projects that do not use codeignitor are doing fine in both my machine and the others locally connected via router.

I think the problem is arising bacause due to the file permissions of the external resources(css,images etc.).

can this problem be solved with .htaccess or any other mechanism?

OS:windows 7 I appreciate any help towords this.

share|improve this question
add comment

2 Answers 2

I found out my own answer to my question.... The problem was related to the base_url settings.

I correct this problem by switching from:

http://localhost/project_folder to http://my_ip/project_folder

This was the reason why only resources were loading on my machine and not other machines.

Thanks everyone who viewed my question and those who tried to answer.

share|improve this answer
add comment

I always access resources like this

 <?= base_url(); ?>css/style.css

and i would recommend it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.