Forum Moderators: phranque
http://www.example.co.uk/pp/product/name/idno to
http://www.example.co.uk/pp/info.php?product=name&id=idno
like so...
# BEGIN UpdateURLS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /pp/
RewriteRule ^product/([A-Za-z0-9-]+)/([0-9]+)/?$ info.php?product=$1&id=$2
</IfModule>
which works, but typing in the search-engine friendly url, the page can't find any of the linked files (style sheet, images, etc..)
<snip>
Can anyone see what I'm doing wrong? Thanks!
[edited by: jdMorgan at 12:26 pm (utc) on Sep. 20, 2006]
[edit reason] Examplified. No URLS, please. See TOS. [/edit]
The solution is to do one of two things:
1) Use server-relative links or canonical links instead of page-relative links (e.g. use <img src="/images/widget.gif"> or <img src="http://www.example.co.uk/images/widget.gif"> instead of <img src="images/widget.gif">
2) Modify your rewrite rules so that the reference URLs on a page are rewritten in the same way as the page URL itself.
It's easy to verify whether this is the problem: Look at your server error log and access log to see what path was used when the image/CSS fetches failed.
Jim