Domain extension rewrite
2 posts
• Page 1 of 1
- Craig Speirs
- Posts: 1
- Joined: 04 Apr 2014, 17:30
Domain extension rewrite
I am a 'newbie' and I am trying to get a ISAPI_Rewrite script that someone else wrote to work correctly. It couurently looks like this:
[ISAPI_Rewrite]
### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteCond URL ^/softree.ca-redirect/(.*)
RewriteCond METHOD GET
RewriteRule ^/softree.ca-redirect/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteCond METHOD POST
RewriteRule ^/softree.ca-redirect/(.*) /$1 [I]
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteRule (.*) /softree.ca-redirect/$1 [I,L]
It works i.e. http://www.softree.ca --> http://www.softree.com but individual pages don't work
i.e. http://www.softree.ca/Products/Products.aspx doesn't map to http://www.softree.com/Products/Products.aspx
Any help or suggestions would be greatly appreciated.
Craig Speirs
[ISAPI_Rewrite]
### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteCond URL ^/softree.ca-redirect/(.*)
RewriteCond METHOD GET
RewriteRule ^/softree.ca-redirect/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteCond METHOD POST
RewriteRule ^/softree.ca-redirect/(.*) /$1 [I]
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteRule (.*) /softree.ca-redirect/$1 [I,L]
It works i.e. http://www.softree.ca --> http://www.softree.com but individual pages don't work
i.e. http://www.softree.ca/Products/Products.aspx doesn't map to http://www.softree.com/Products/Products.aspx
Any help or suggestions would be greatly appreciated.
Craig Speirs
Re: Domain extension rewrite
Hello,
First, please clarify if it's v2 or v3 that you use. Because the syntax looks like v2 but you posted the question in v3 forum.
Generally, in v2 what you want can be achieved as follows:
ISAPI_Rewrite]
### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteCond METHOD GET
RewriteRule (.*) http://www.softree.com$1 [I,P]
First, please clarify if it's v2 or v3 that you use. Because the syntax looks like v2 but you posted the question in v3 forum.
Generally, in v2 what you want can be achieved as follows:
ISAPI_Rewrite]
### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?softree\.ca
RewriteCond METHOD GET
RewriteRule (.*) http://www.softree.com$1 [I,P]
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests