Forum Moderators: phranque
RewriteBase /
RewriteRule ^index\.isindex.php [L]
RewriteRule ^about\.isabout.php [L]
RewriteRule ^login\.islogin.php [L]
RewriteRule ^register\.isregister.php [L]
RewriteRule ^contact\.iscontact.php [L]
RewriteRule ^profile\.isprofile.php [L]
RewriteRule ^search\.issearch.php [L]
RewriteRule ^display/([0-9]+)/([0-9]+)/([_0-9a-zA-Z-]+)\.is$pdisplay.php?prodc=$1&prods=$2&scn=$3 [L]
This is my .htaccess file.
When I click on pdisplay/$id/$id2/$name it takes me to pdisplay.php?prodc=$1&prods=$2&scn=$3 which is correct.
Now, the problem: When I arrive to pdisplay.php it thinks that all the files are in the folder pdisplay/$id/$id2/$name. There is no such folder structure. All the files are on the root. Becuase of this, my CSS is not loading and the website looks like junk. All my links are linked to pdisplay/$id/$id2/$name/about.is etc...
How do I assign my new redirect it realises that pdisplay/$id/$id2/$name are just fake folders and the real folder is the root?
Either rewrite all css, image, and external JavaScript files back to root, or link to them using server-relative or canonical links; i.e. <img src="/logo.gif"> or <img src="http://www.example.com/logo.gif">
Jim
[edited by: jdMorgan at 4:33 am (utc) on June 12, 2007]