Forum Moderators: phranque

Message Too Old, No Replies

basic mod_rewrite problem

         

weemel

2:48 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Hi everyone,

I've set up some RewriteRules, which seem to work fine apart from that for each page that has been rewritten, the styles and images from the page are gone (ie. the page consists only of words)?

I get the feeling i'm missing something very basic here. Can anyone help?

Thanks!

jdMorgan

3:52 pm on Mar 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, your image and CSS links are probably not rooted.

Use <img src="/path_to_image.gif"> instead of <img src="path_to_image.gif">.

This is still a relative path to the image, but it is relative to the Web root directory of the site, rather than relative to the current directory (which you have changed by using mod_rewrite).

Jim

weemel

12:08 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



Yeah that makes sense! Ta muchly =)