Reputation: 147
I have a website at domain.com, it has a login page at domain.com/user/login. I would like login.domain.com to show the login but still have the url login.domain.com.
what i have now:
RewriteCond %{HTTP_HOST} ^login.domain.nl$ [NC]
RewriteRule (.*) http://domain.nl/user/login$1 [L]
but this changes the url as well and if i change it to:
RewriteCond %{HTTP_HOST} ^login.domain.nl$ [NC]
RewriteRule (.*) http://domain.nl/user/login$1 [P,L]
i get a 400..
what am i doing wrong?
Upvotes: 0
Views: 412
Reputation: 21
This question is in the wrong seciton, however, you can't necessarily call the remote page like you want to (even using the proxy flag), you need to make a local reference.
You need to do something like:
RewriteCond %{HTTP_HOST} ^login.domain.nl$ [NC]
RewriteRule (.*) /user/login.php?arguments=$1 [QSA,L]
That references the local location of the file.
Upvotes: 2