mo Posted January 15, 2009 Share Posted January 15, 2009 My site has various sub domains, i.e. 123.mysite.com and when a user request 123.mysite.com I want them to always be redirected to 123.mysite.com/store.php. I know this should be simple to accomplish but not sure of the best method. Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 15, 2009 Share Posted January 15, 2009 subdomain or not your webserver will try to provide a landing page for the client: index.html, default.html depending on how you set up apache/whatever server you use.. that being said you can ASSUME that 123.whatever.com will automatically land on 123.whatever.com/index.php inside index.php put this: <? header("location: store.php"); ?> Quote Link to comment Share on other sites More sharing options...
mo Posted January 15, 2009 Author Share Posted January 15, 2009 Perfect. I knew it was really simple and I feel stupid that I did not realize how to get this working. It is now working. Thanks. Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 15, 2009 Share Posted January 15, 2009 there is other methods you can use such as .htaccess but this is probably the most simple Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.