I rewrite domain.com/product/ to domain.com/page.php3?id=product using the following htaccess RewriteRule ^(.*)/$ /page.php3?id=$1 The problem is that I have a stats directory at domain.com/stats which is redwritten with this script as well. How can I solve this?
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.*)/$ page.php3?id=$1 RewriteRule ^stats/$ stats/ [L] If that doesn't fix it, the only way is having something uniqe in the fake URLs, like adding a directory, or extention.
I had already tried that but it failed. Over the last hour I fixed it using the following code....... RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [L] RewriteRule ^(.*)/$ /page.php3?id=$1 Code (markup): This checks to see if there is a real directory before it applies the rewrite rule.