
01-17-2012, 03:49 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,337
|
|
so what you want is that if nothing after last "/", do not show that (empty parameter) in query string.
/directory/find-a-consultant/ ==> index.php?func=find-a-consultant instead of index.php?func=find-a-consultant&urlA=
Quote:
RewriteEngine On
RewriteBase /directory/
RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)[/]*$ index.php?func=$1&urlA=$2&urlB=$3&urlC=$4 [QSA,L]
#RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^([^/]+)/([^/]+)/([^/]+)[/]*$ index.php?func=$1&urlA=$2&urlB=$3 [QSA,L]
#RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^([^/]+)/([^/]+)[/]*$ index.php?func=$1&urlA=$2 [QSA,L]
#RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^([^/]+)[/]*$ index.php?func=$1 [QSA,L]
|
|