Forum Moderators: phranque
RewriteEngine on
RewriteRule ^images/([0-9]+)/$ index.php?image=$1
This is to convert URLs in the form:
www.mysite.com/images/80/
to:
www.mysite.com/index.php?image=80
This works, and the browser finds the correct page. However, in the HTML, all of the files that make up the page (CSS, JS and JPEG) are referred to by their filename only, as they are in the same directory as index.php.
The problem is, that after redirection the browser is looking for the files in the wrong place, e.g. www.mysite.com/images/80/main.css instead of www.mysite.com/main.css.
Anyone got any ideas why this is? Surely I don't have to link to every file and image with a full file path do I?
Thanks for any help!