Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: Subdomain Redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
droid01
Newbie
Newbie


Joined: 04 August 2010
Online Status: Offline
Posts: 9
Posted: 04 August 2010 at 12:52pm | IP Logged Quote droid01

Hello. I'm trying to redirect to a specific location on a www domain from a subdomain. No matter what I try, it keeps redirecting me to what we have setup for the subdomain itself. Here is what we have. Any thoughts? Thank you.

#specific page we want to redirect from subdomain
RewriteCond %{HTTP:Host} ^www\.domain\.com\/redirect/?$
RewriteRule /volunteer/? http\://subdomain.main-website-domain.com/ [NC,L,R=301]

RewriteCond %{HTTP:Host} ^domain\.com\/redirect/?$
RewriteRule /volunteer/? http\://subdomain.main-website-domain.com/ [NC,L,R=301]

#redirect for the domain itself
RewriteCond %{HTTP:Host} ^www\.domain\.com$
RewriteRule (.*) http\://www\.main-website-domain\.com/page.aspx [NC,L,R=301]

RewriteCond %{HTTP:Host} ^domain\.com$
RewriteRule (.*) http\://www\.main-website-domain\.com/page.aspx [NC,L,R=301]
Back to Top View droid01's Profile Search for other posts by droid01
 
droid01
Newbie
Newbie


Joined: 04 August 2010
Online Status: Offline
Posts: 9
Posted: 04 August 2010 at 2:55pm | IP Logged Quote droid01

My apologies, the part above that says /volunteer/ should say /redirect/. We want to redirect www.domain2.com/redirect to http://subdomain.domain.com/.
Back to Top View droid01's Profile Search for other posts by droid01
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 05 August 2010 at 2:40am | IP Logged Quote Anton

Your mistake is that you put a portion of path into the HOST condition and it's not recognized.
The correct syntax for the cond must be:

RewriteCond %{HTTP:Host} ^www\.domain\.com$
or
RewriteCond %{HTTP:Host} ^domain\.com$

The rest should be put in RewriteRule statement.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
droid01
Newbie
Newbie


Joined: 04 August 2010
Online Status: Offline
Posts: 9
Posted: 05 August 2010 at 10:15am | IP Logged Quote droid01

This has been resolved via a suggestion from another post. Thanks for your assistance.
Back to Top View droid01's Profile Search for other posts by droid01
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum