This is my htacess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^(.*)\.mydomain\.com(.*)
RewriteRule .* inside.php?tx=%1&filter=%2
This url: hello.mydomain.com goes to http://www.mydomain.com/inside.php?tx=hello
Thats correct.
Now i need this url hello.mydomain.com/bye/ goes to http://www.mydomain.com/inside.php?tx=hello&filter=bye, but don’t work. Only goes to http://www.mydomain.com/inside.php?tx=hello
This htaccess is ignoring the second variable (bye). Help please.
%{HTTP_HOST}only contains the host name (hello.mydomain.com), so your second backreference doesn’t have anything in it. Changing yourRewriteRuleto the following should give the behaviour you’re expecting:Edit: To correct the situation described in your comment, the entire ruleset should be as follows: