I have the following rewrite rule:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} Catalog\/(string|page)\/
RewriteRule ^Catalog\/(string|page)\/([^\/]+)\/[^\.]+\.html$ Catalog/Catalog.php?$1=$2
RewriteRule is on one line but may be showing on multiple lines here.
My questions is mainly what am I doing wrong. I am not getting any errors so Rewrite is working. The address I am typing in to the browser is www.domain.com/Catalog/string/RT/Round_Tomato.html and what I was hoping to get is www.domain.com/Catalog/Catalog.php?string=RT
I am guessing my regex is messed up but have not been able to get it right.
I think that the first wrong thing is putting point without backslash before (.) => www.
here is a clear example:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
check this out:
you should restart your apache server -if it’s a local server- (start and stop) and you must be able to access http://localhost/Catalog/string/RT.html