This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: Subdomain Redirect
Author
Message |
droid01
Newbie


Joined: 04 August 2010
Posts: 9
Posted: 04 August 2010 at 12:52pm

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
 
droid01
Newbie


Joined: 04 August 2010
Posts: 9
Posted: 04 August 2010 at 2:55pm

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
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 05 August 2010 at 2:40am

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
 
droid01
Newbie


Joined: 04 August 2010
Posts: 9
Posted: 05 August 2010 at 10:15am

This has been resolved via a suggestion from another post. Thanks for your assistance.
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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