Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite folder problem

         

James302415

11:54 am on Jul 4, 2005 (gmt 0)

10+ Year Member



Does anyone have the problem of when they rewrite their ulrs it screws around with their folder root? If I use www.domain.com/forum/2 I get index.php?f=forum&id=2 which is fine but then all the images on my page doen't show up because they are looking for them in forum/images/ instead of just images/ . Is there anyway to stop this from happening? Cheers

Longhaired Genius

12:27 pm on Jul 4, 2005 (gmt 0)

10+ Year Member



Yes. Make your links either absolute (http://www.example.com/path/to/resource) or relative to your website root directory (/path/to/resource).

Birdman

12:52 pm on Jul 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with Longhaired Genius. There is another option though. You could add another rewrite rule to fix the image links:

RewriteRule ^/forum/images/(.*) /images/$1 [L]

Cheers