Forum Moderators: phranque
Im new to mod_rewrite but not new to RegExp. I know to use RegExp in PHP using PCRE.
I have a folder domain.com/a/b
I have the .htaccess in the folder b.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com/a/b/ [NC]
ReWriteRule ^list/(.*?)-(.*?)\.htm script\.php?q=$1&start=$2 [L]
Shows 500!
Any idea whats wrong?
Thanks
I assume with the (.*?) you are trying to do a non-greedy match, which mod_rewrite does not support (to my knowledge). Also, the HTTP_HOST does not contain any path information; what were you trying to check with that line? If you're just trying to verify the path, then you could do something like this:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/a/b/ [NC]
RewriteRule ^list/([^-]*)-([^\.]*)\.htm script.php?q=$1&start=$2 [L]
What I want is
[domain.com...]
to actually execute
[domain.com...]