.htaccess mod_rewrite and PHP
Posted on 2009-04-20
Hello all, we have a PHP application and would like to add friendly URL's to it.
We're trying to use mod_rewrite to accomplish it but not having luck with it.
The system always calls the same file index.php with variables to include the correct information, so some typical URLs would be:
and so on...
When using: RewriteRule ^(.*)/(.*)/(.*?).html$ index.php?page=$1&task=$2&id=$3
the URL: index.php?page=test&task=edit&id=1 works but index.php?page=test&task=view doesn't work.
Thanks in advance.