I\'m putting up a CMS system that I just finnished. I want to use mod_rewrite to handle get variables to my main script. I\'ve tried a few examples, but I can\'t seem to get this to work properly.
What I\'d like to do is have:
www.mydomain.com/index.php?page=products
be displayed as
www.mydomain.com/products
I used this in my httpd.conf file:
RewriteEngine on
RewriteRule /([a-z]+) /index.php?page=$1
and I was able to get it working for a little bit. I put in in the <directory> directive. I tried to put it in the .htaccess file, but it did nothing when I did. Basicaly, I have a few questions. One, how come it doesn\'t seem to work when I put it in the .htaccess file. Two, how can I write a rule that will check to see if the request actualy exists in the file system, if so, serve the actual file, not rewrite it.
Example: within the document root, there is a path \'inventory\' so
when www.mydomain.com/inventory is requested, I want to serve up the default document in the directory, not index.php?inventory. How?
Is there a good document that explains all the things used to write a rewrite rule? I\'m confused by the use of carrots and parens and brackets and what not. I read teh apache documentation, but it was not easy to understand :roll:, hence, I\'m here asking.
I read the article: http://www.phpfreaks.com/tutorials/23/0.php It wasn\'t really much help.
Also, what\'s the best place to put rewrite rules, and what <directory > options or permissions need to be on in order to use it?
Thanks
lost :arrow: - Anthony