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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.