Jump to content

CSS, Java, Img Loading


johnslater

Recommended Posts

I recently added a url structure to my website which makes it look like the page you are viewing is within a folder structure.

 

For example it will look like the file is within /pages/sandbox which in fact its within the home directory. The problem with this is my Style Sheet and Images (javascript too) all load from within that folder rather than the first directory in the structure.

 

I know this can be done by using something like this.... ../../css/style.css or /css/style.css however that would mean recording the entire website and i dont want to do that unless 100% necessary

 

 

Is there a way to make PHP or .htaccess fool my website into looking in the correct directory for images, css and javascript. Thanks.

Link to comment
https://forums.phpfreaks.com/topic/87794-css-java-img-loading/
Share on other sites

one shortcut would be to place files to include the right files you need.  So say your site is looking in directory a, but the files you need are in directory b.  Place files in directory a which will then include() the files from the proper locations.

Link to comment
https://forums.phpfreaks.com/topic/87794-css-java-img-loading/#findComment-449066
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.