| Posted: 05 March 2008 at 3:17am | IP Logged
|
|
|
Hi All
I can get the following to work, but as soon as I add a slash to the RewriteRule it affects the page's relative links like stylesheets and images:
The following works: http://localhost/iPassion/Current/products
RewriteBase /iPassion/Current/ RewriteRule ^products$ body.php?getpage=ProductsView&categoryID=$1 [NC,L]
127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:32:09 GMT [localhost/sid#1][rid#7635668] init rewrite engine with requested uri /iPassion/Current/products 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:32:09 GMT [localhost/sid#1][rid#7635668] Htaccess process request D:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:32:09 GMT [localhost/sid#1][rid#7635668] applying pattern '^products$' to uri 'products' 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:32:09 GMT [localhost/sid#1][rid#7635668] Rewrite URL to >> /iPassion/Current/body.php?getpage=ProductsView&categoryID= 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:32:09 GMT [localhost/sid#1][rid#7635668] rewrite 'products' -> '/iPassion/Current/body.php?getpage=ProductsView&categoryID=' 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:32:14 GMT [localhost/sid#1][rid#7635668] init rewrite engine with requested uri /iPassion/Current/templates/images/triangle.gif
--------------------------------------------------------------
Adding the slash doesn't work: http://localhost/iPassion/Current/products/1
RewriteBase /iPassion/Current/ RewriteRule ^products/([0-9])$ body.php?getpage=ProductsView&categoryID=$1 [NC,L]
127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:00 GMT [localhost/sid#1][rid#7619748] init rewrite engine with requested uri /iPassion/Current/products/1 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:00 GMT [localhost/sid#1][rid#7619748] Htaccess process request D:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:00 GMT [localhost/sid#1][rid#7619748] applying pattern '^products/([0-9])$' to uri 'products/1' 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:00 GMT [localhost/sid#1][rid#7619748] Rewrite URL to >> /iPassion/Current/body.php?getpage=ProductsView&categoryID=1 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:00 GMT [localhost/sid#1][rid#7619748] rewrite 'products/1' -> '/iPassion/Current/body.php?getpage=ProductsView&categoryID=1' 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:06 GMT [localhost/sid#1][rid#7619748] init rewrite engine with requested uri /iPassion/Current/products/templates/style.css 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:06 GMT [localhost/sid#1][rid#7619748] Htaccess process request D:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:06 GMT [localhost/sid#1][rid#7619748] applying pattern '^products/([0-9])$' to uri 'products/templates/style.css' 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:06 GMT [localhost/sid#1][rid#7619748] init rewrite engine with requested uri /iPassion/Current/products/templates/Body/images/bg.jpg 127.0.0.1 127.0.0.1 Wed, 05-Mar-2008 08:29:06 GMT [localhost/sid#1][rid#7619748] Htaccess process request D:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
-----------------------------------------------------------
I don't know why it's inserting a "products" directory to the page's relative links: e.g.
<link rel="stylesheet" type="text/css" href="templates/style.css" /> <BODY BACKGROUND="templates/Body/images/bg.jpg">
Any Ideas? Spent 2 days with no luck so far, trying various combinations.
Thanks Psyche 
|