subdomain page to be redirected to main domain page
2 posts
• Page 1 of 1
subdomain page to be redirected to main domain page
Hello,
I have a site with 10 subdomains. I want that when a user clicks on the sign in link from subdoamin he has to land on the main domain sign in page. The following code does not work please help.
RewriteCond %{HTTP:Host} ^(?!www)([^.]+)\.mydomain\.com$
RewriteRule ^signin.asp$ http://www.mydoamain.com/signin.asp [NC,P]
I have a site with 10 subdomains. I want that when a user clicks on the sign in link from subdoamin he has to land on the main domain sign in page. The following code does not work please help.
RewriteCond %{HTTP:Host} ^(?!www)([^.]+)\.mydomain\.com$
RewriteRule ^signin.asp$ http://www.mydoamain.com/signin.asp [NC,P]
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: subdomain page to be redirected to main domain page
Hello,
Lets try:
If it doesn't work. PLease, make sure that proxying is working. In order to do so, you can create a testing rule that proxyes certain page to google.uk, for example.
Regards
Andrew
Lets try:
- Code: Select all
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP:Host} !^www\.mydomain\.com$
RewriteCond %{HTTP:Host} ^[^.]+\.mydomain\.com$
RewriteRule ^signin\.asp$ http://www.mydoamain.com/signin.asp [NC,P]
If it doesn't work. PLease, make sure that proxying is working. In order to do so, you can create a testing rule that proxyes certain page to google.uk, for example.
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 18 guests