Redirect/Subdomain with .htaccess
Posted
by fractalbit
on Stack Overflow
See other posts from Stack Overflow
or by fractalbit
Published on 2010-03-29T23:23:27Z
Indexed on
2010/03/29
23:43 UTC
Read the original article
Hit count: 364
What i have currently:
- A wildcard dns record. So that every subdomain points to www.galop.gr
A dynamically (php) generated .htacces file where i append the following code for every subdomain i want working:
RewriteCond %{HTTP_HOST} ^fractalbit.galop.gr$ [OR] RewriteCond %{HTTP_HOST} ^www.fractalbit.galop.gr$ RewriteRule ^/?$ http://www.galop.gr/index.php?user=1 [R=301]
Everything is working fine, i just want something more if it is possible.
Right now, if someone enters fractalbit.galop.gr will be redirected to http://www.galop.gr/index.php?user=1
Is it possible to do this BUT keep fractalbit.galop.gr to the address bar of the browser?
Thanks for any replies.
© Stack Overflow or respective owner