Welcome to WebmasterWorld Guest from 22.214.171.124
They look like this.
I'm using mod_rewrite to turn them into this
The problem I'm having is that the rewrite rules I put in .htaccess don't seem to be doing anything. If I link to www.site.com/products I get 404 not found error. My webhost supports the feature. Here is my .htaccess. Any ideas what I'm doing wrong?
Options All -Indexes
RewriteRule ^/products/([0-9]+) /index2.php?crn=$1
RewriteRule ^/articles/([0-9]+) /index2.php?article=$1
RewriteRule ^/articles /index2.php?page=articleindex
RewriteRule ^/products /index2.php?page=displaycats
RewriteRule ^/service /index2.php?page=service
RewriteRule ^/myaccount /index2.php?page=myaccount
In practical terms, what this means is that the path to the current directory is stripped from the URL-path examined by RewriteRule. So, if you are in the top-level Web-accessible directory, then the path to the current directory, namely "/", is stripped.
Your rules will likely work better and more efficiently if tweaked as follows:
RewriteRule ^products/([0-9]+) /index2.php?crn=$1 [L]
RewriteRule ^articles/([0-9]+) /index2.php?article=$1 [L]
RewriteRule ^articles /index2.php?page=articleindex [L]
RewriteRule ^products /index2.php?page=displaycats [L]
RewriteRule ^service /index2.php?page=service [L]
RewriteRule ^myaccount /index2.php?page=myaccount [L]