I'm developing a site around a php shopping cart. The URLs it uses are not SE friendly.
They look like this. www.site.com/index.php?page=products
I'm using mod_rewrite to turn them into this www.site.com/products
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?
Remember that .htaccess is a per-directory context. One of the things that this implies is that rule in .htaccess need have no knowledge of the 'higher-level' server directory and URL structure in order to work; This both protects the server security and makes it easier for you to write rules in the restricted .htaccess environment.
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: