This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: domain redirect: handle HTTP/HTTPS Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
zhoover
Newbie
Newbie


Joined: 08 March 2010
Online Status: Offline
Posts: 1
Posted: 08 March 2010 at 11:59am | IP Logged Quote zhoover

Hello,

Is there a way to account for both HTTP/HTTPS redirects?

I am looking what ever the old domain name was using an apply it to the rewrite.

So if one page in the site was using http, I want to redirect to an HTTP page in the site. 

If another page was using HTTPS i would like to use the HTTPS in the redirect.

Only way I can think of doing this would be include a wildcard for the s

so something like

RewriteCond Host: (?:http(.*)\://)?myolddomain.com.\(.*)


Even if this did work I am not sure what to include in the RewriteRule


any help on this would me awsome

Thanks!

Back to Top View zhoover's Profile Search for other posts by zhoover
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 09 March 2010 at 5:18am | IP Logged Quote Anton

Ok, I see what you want. Please consider using the config like this (for ISAPI_Rewrite v2):

[ISAPI_Rewrite]

RewriteCond %HTTPS (on)?.*
RewriteCond Host: www\.olddomain\.com
RewriteRule (.*) http(?1s)\://www.newdomain.com$1 [RP]

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

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