Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: 301 for misspelled domina w/HTTPS Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
BluesmanMedia
Newbie
Newbie


Joined: 31 August 2010
Location: United States
Online Status: Offline
Posts: 2
Posted: 31 August 2010 at 4:00pm | IP Logged Quote BluesmanMedia

Hey guys,

Very new to this so bare with me...

My entire site runs under HTTPS and I currently have a rule that works just fine insuring that:

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

However I also own a domain with a common mispelling and I need to do a 301 redirect to the main site.  So for example:

If a user types: "zzz.com" (or any variation of that) I need the 301 target to be "https://www.z.com"

I have tried several examples from the site but I could not get any of them to work.  Any help would be appreciated.

Regards,
Rock

Back to Top View BluesmanMedia's Profile Search for other posts by BluesmanMedia
 
BluesmanMedia
Newbie
Newbie


Joined: 31 August 2010
Location: United States
Online Status: Offline
Posts: 2
Posted: 31 August 2010 at 4:51pm | IP Logged Quote BluesmanMedia

got it!

RewriteCond %{HTTP_HOST} ^(www\.)?zzz\.com$ [NC]
RewriteRule ^(.*)$ https\://www.z.com$1 [NC,R=301]
Back to Top View BluesmanMedia's Profile Search for other posts by BluesmanMedia
 

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