Forum Moderators: phranque

Message Too Old, No Replies

Virtual Subdomain + htaccess

         

define

1:39 pm on Sep 14, 2007 (gmt 0)

10+ Year Member



Hi,

I have web site where visitors can register and get [user.mydomain.com...]

I changed my domain to catch all and now when i type [user.mydomain.com...] they enter my index page.

I used php to extract subdomain name and used it like variable to match page for my user and now when i type user.mydomain.com page redirect to index.php?who=user

But i don't want it, i want to stay on that domain address bar not to be redirected and have my www.mydomain.com/index.php?who=user

jdMorgan

2:30 pm on Sep 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you use a redirect, then the address bar will change.

You can remove the PHP redirect and simply "include" the correct content for that user in the page, reading it directly from the server filesystem.

For more discussion on this subject, I recommend our PHP forum [webmasterworld.com].

Jim