Linode Forum
https://forum.linode.com/

forwarding domain, but not subdomain
https://forum.linode.com/viewtopic.php?f=19&t=5074
Page 1 of 1

Author:  embarkadero [ Tue Jan 19, 2010 7:25 pm ]
Post subject:  forwarding domain, but not subdomain

Is it possible to forward http://www.mydomain.com, but not http://www.mydomain.com/page/

thanks!

Author:  waldo [ Tue Jan 19, 2010 8:14 pm ]
Post subject: 

That's not a sub-domain, that's a page within your domain.

example.com = domain

www.example.com = sub-domain of example.com (most people have www.example.com and example.com point to the same place but they don't have to)

photos.example.com = sub-domain of example.com

I'm sure what you're asking about could probably be done with URL Rewrite rules, but I'm not sure what those would look like.

Author:  embarkadero [ Tue Jan 19, 2010 8:15 pm ]
Post subject: 

waldo wrote:
That's not a sub-domain, that's a page within your domain.

example.com = domain

www.example.com = sub-domain of example.com (most people have www.example.com and example.com point to the same place but they don't have to)

photos.example.com = sub-domain of example.com

I'm sure what you're asking about could probably be done with URL Rewrite rules, but I'm not sure what those would look like.


Good points. Didn't know. Thanks - I'm learning as I go. :-)

Author:  hybinet [ Tue Jan 19, 2010 8:23 pm ]
Post subject: 

If you have PHP, one of the simplest solutions would be to use the following script as index.php

Code:
<?php header('Location: http://whatever.address/you/want/to/redirect/to');


Or, you can put something in an .htaccess file. It would probably look like:

Code:
RewriteCond %{request_uri} /
RewriteRule ^(.*)$ http://destination/$1


But it's been a while since I've played with mod_rewrite, so I might be missing something there.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/