- Oct 24, 2004
- 232
- 1
- 65
Evening all,
I am looking for a little assistance with mod rewrite for apache.
I am building my own eCommerce platform and I want to rewrite my dynamic URLs to friendly URLs.
An example, I want:
I want: http://www.peakwebdesigns.co.uk/ecommerce/product_page?id=3
to be http://www.peakwebdesigns.co.uk/ecommerce/product/3
This is my current .htaccess with the rewrite rule:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^product/([^\s\/]+)/?$ product_page.php?id=$1 [END]
Can anyone help me?
Thanks.
Stan.
I am looking for a little assistance with mod rewrite for apache.
I am building my own eCommerce platform and I want to rewrite my dynamic URLs to friendly URLs.
An example, I want:
I want: http://www.peakwebdesigns.co.uk/ecommerce/product_page?id=3
to be http://www.peakwebdesigns.co.uk/ecommerce/product/3
This is my current .htaccess with the rewrite rule:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^product/([^\s\/]+)/?$ product_page.php?id=$1 [END]
Can anyone help me?
Thanks.
Stan.