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 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: 301 for misspelled domina w/HTTPS
Author
Message |
BluesmanMedia
Newbie


Joined: 31 August 2010
Location: United States
Posts: 2
Posted: 31 August 2010 at 4:00pm

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
 
BluesmanMedia
Newbie


Joined: 31 August 2010
Location: United States
Posts: 2
Posted: 31 August 2010 at 4:51pm

got it!

RewriteCond %{HTTP_HOST} ^(www\.)?zzz\.com$ [NC]
RewriteRule ^(.*)$ https\://www.z.com$1 [NC,R=301]
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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