Forum Moderators: phranque
I have URLs like
http://www.example.com/keyword/variable/variabledigit1-variabledigit2.html
I want to redirect this url to process.php?did=digit1&id=digit2
for this i tried the following rewrite url in htaccess file but it does nor read the URL pattern,
RewriteCond %{REQUEST_URI} ^/keyword/(.+)/(.+)-(.+)\.html/$
RewriteRule ^/keyword/(.+)/(.+)-(.+)\.html/$ process.php?did=$2&id=$3 [L]
Can anybody help me please how to make this rule to catch the URL pattern?
thank you
The RewriteCond is redundant. It is not needed. I commented it out.
# RewriteCond %{REQUEST_URI} ^/keyword/(.+)/(.+)-(.+)\.html/$
#
# Change rule pattern to match htaccess local URL-path, eliminate inefficient ".*" patterns
RewriteRule ^keyword/([^/]+)/([^-]+)-([^.]+)\.html/?$ process.php?did=$2&id=$3 [L]