Hi, I've got an .htaccess file which works great, but I need to add one more rule to it, which I haven't been able to do successfully. Here's the existing file:
Code:
RewriteEngine ON
##### Index Page Rules #####
RewriteRule ^(.*)/(.*).php index.php?tid=$1&pid=$2
The existing rule takes
mydomain.com/frontend/$1/$2.php
and points it to
mydomain.com/frontend/index.php?tid=$1&pid=$2
(The .htaccess file is located in the frontend directory.)
This works fine. But sometimes, there is no $pid passed... and this is the situation I need to account for.
In other words, when a user enters
mydomain.com/frontend/$1
I need it to point to
mydomain.com/frontend/index.php?tid=$1
Any help greatly appreciated 
|