Hi All,
I am again stuck with trailing slash issue, this time a little bit complicated.
This is my rewrite:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z_]+)$ index.php?country=$1
RewriteRule ^([a-zA-Z_]+)/([a-zA-Z_]+)$ index.php?country=$1&state=$2
RewriteRule ^([a-zA-Z_]+)/([a-zA-Z_]+)/([a-zA-Z_]+)$ index.php?country=$1&state=$2&city=$3
RewriteRule ^([a-zA-Z_]+)/([a-zA-Z_]+)/([a-zA-Z_]+)/age-([0-9\-]+)$ index.php?country=$1&state=$2&city=$3&age=$4
It works like this.. each time when a user selects country it asks for the state and then city. for example
domainname.com/country
after that
domainname.com/country/state
after that
domainname.com/country/state/city
and so on..
It works fine.. BUT when i add trailing slash, I get page not found error.
For example
domainname.com/country would work perfect
BUT
domainname.com/country/ will give error
also
domainname.com/country/state would work fine
BUT
domainname.com/country/state/
will generate error
Please help me.
Regards
Tabish