I'm having a problem with looping. I'd trying to take a url like:
abc.user.domain.com/123
and turn it into:
www.domain.com/cgi-bin/test/123/abc.html
Here's the rule I'm using:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^[^.]+\.user\.domain\.com$
RewriteRule ^(.*) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.user\.domain\.com/(.*)$ http://www.domain.com/cgi-bin/test/$2/$1.html [R,L]
I get a 403 Forbidden error with the hostname repeated about 10 times in the URL. Any ideas?