My .htaccess guy is out for the week, I need help. I need to keep this directory structure as the user navigates my directory: /region/city/category/page/t/ I tried this: RewriteEngine on RewriteBase /JOB/ RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_URI} !\. RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L] RewriteRule ^(.*)/$ directory.php?region=$1 [L,QSA] RewriteRule ^(.*)/(.*)/$ directory.php?region=$1&city=$2 [L,QSA] RewriteRule ^(.*)/(.*)/(.*)/$ directory.php?region=$1&city=$2&cat_name=$3 [L,QSA] RewriteRule ^(.*)/(.*)/(.*)/(.*)/$ directory.php?region=$1&city=$2&cat_name=$3&p=$4 [L,QSA] RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/$ directory.php?region=$1&city=$2&cat_name=$3&p=$4&t=$5 [L,QSA] Code (markup): But only the first link works right. The others dont pass the variables correctly. I will pay $30 (paypal) for the solution. Need imediately. The process: The user chooses a region, next page chooses a city, next page chooses a category, then next is pagenumber, then a last variable named $t.
This shold work fine: Options +FollowSymLinks RewriteEngine On RewriteRule ^(.*)/ directory.php?region=$1 [QSA,L] RewriteRule ^(.*)/(.*)/ directory.php?region=$1&city=$2 [QSA,L] RewriteRule ^(.*)/(.*)/(.*)/ directory.php?region=$1&city=$2&cat_name=$3 [QSA,L] RewriteRule ^(.*)/(.*)/(.*)/(.*)/ directory.php?region=$1&city=$2&cat_name=$3&p=$4 [QSA,L] RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/ directory.php?region=$1&city=$2&cat_name=$3&p=$4&t=$5 [QSA,L] PHP: