Topic: Subdomain Redirect
|

|
| Author |
|
droid01 Newbie

Joined: 04 August 2010
Online Status: Offline Posts: 9
|
| Posted: 04 August 2010 at 12:52pm | IP Logged
|
|
|
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
Online Status: Offline Posts: 9
|
| Posted: 04 August 2010 at 2:55pm | IP Logged
|
|
|
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
Online Status: Offline Posts: 10489
|
| Posted: 05 August 2010 at 2:40am | IP Logged
|
|
|
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
Online Status: Offline Posts: 9
|
| Posted: 05 August 2010 at 10:15am | IP Logged
|
|
|
This has been resolved via a suggestion from another post. Thanks for your assistance.
|
| Back to Top |
|
| |
|
|
If you wish to post a reply to this topic you must first login
If you are not already registered you must first register
|
|
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
|