johnslater Posted January 25, 2008 Share Posted January 25, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/87794-css-java-img-loading/ Share on other sites More sharing options...
Stooney Posted January 25, 2008 Share Posted January 25, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/87794-css-java-img-loading/#findComment-449066 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.