I have serious problems configuring apache to do the following:
http://aaa-bbb.mydomain.com/test --> http://aaa-bbb.mydomain.com/test/index.php?param1=aaa¶m2=bbb
I tried the following code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([A-Za-z]+)-([A-Za-z]+). [NC]
RewriteRule ^/test/?$ test/index.php?param1=%1¶m2=%2 [L]
I don't know the reason, but I get an error 400 (Bad Request), when I
visit http://aaa-bbb.mydomain.com/test.
If I set the rewrite rule with [R,L] everything works fine, but I
don't want the parameters to appear twice (once in the subdomain and
then in the query string)!
Can you help me?