Forum Moderators: phranque

Message Too Old, No Replies

ignoring css, photos

dynamic to static ignoring css,

         

matovu

10:01 am on Feb 20, 2007 (gmt 0)

10+ Year Member



Hullo All,
I need help with this. I am very new to URL re-writing and I have read lots and I have come up with the following .htacess file.

RewriteEngine on
RewriteRule ^pages/([0-9]*).* index.php?p_id=$1 [L,NC]

The problem is that I can get the css, jpgs etc file working I think because of this. Could anyone please help me out. Thanks in advance

jdMorgan

2:57 pm on Feb 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The pattern may be too ambiguous. I'd suggest:

RewriteEngine on
RewriteRule ^pages/([0-9]+) index.php?p_id=$1 [L]

As to the CSS and photo files, be aware that it is the browser that resolves page-relative links, so you may need to rewrite those requests as well, or to specify them as server-relative links or canonical URLs for those paths. That is, use <img src="/path_to_image.gif"> or <img src="http://example.com/path_to_image.gif">

Jim