Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jan 19, 2010 7:25 pm 
Offline
Senior Newbie

Joined: Tue Jan 19, 2010 10:11 am
Posts: 9
Is it possible to forward http://www.mydomain.com, but not http://www.mydomain.com/page/

thanks!


Top
   
 Post subject:
PostPosted: Tue Jan 19, 2010 8:14 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
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.


Top
   
 Post subject:
PostPosted: Tue Jan 19, 2010 8:15 pm 
Offline
Senior Newbie

Joined: Tue Jan 19, 2010 10:11 am
Posts: 9
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. :-)


Top
   
 Post subject:
PostPosted: Tue Jan 19, 2010 8:23 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group