| Author |
Message |
embarkadero
Joined: 19 Jan 2010
Posts: 9
|
| Posted: Tue Jan 19, 2010 6: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! |
|
| Back to top |
|
waldo
Joined: 21 May 2009
Posts: 336
|
| Posted: Tue Jan 19, 2010 7: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. |
|
| Back to top |
|
embarkadero
Joined: 19 Jan 2010
Posts: 9
|
| Posted: Tue Jan 19, 2010 7: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. :-) |
|
| Back to top |
|
hybinet
Joined: 02 May 2008
Posts: 971
|
| Posted: Tue Jan 19, 2010 7: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. |
|
| Back to top |
|
| |