Skip to content

Instantly share code, notes, and snippets.

@shareefhiasat
Last active May 23, 2017 12:14
Show Gist options
  • Save shareefhiasat/a45aff0c35139ff3261e8505ce3c241c to your computer and use it in GitHub Desktop.
Save shareefhiasat/a45aff0c35139ff3261e8505ce3c241c to your computer and use it in GitHub Desktop.
if domain equal old.sajilni or new.sajilni then redirect to https://www.sajilni.com
<rule>
<name>Domain Name Check</name>
<note>Check that users are using the correct domain name to get to your site. ie, users gong to https://sajilni.com/blah will be redirected to https://www.sajilni.com/blah</note>
<condition name="host" operator="equal">www.sajilni.com</condition>
<condition name="host" operator="equal">new.sajilni.com</condition><!-- put not equal instead of not equal for A B testing -->
<condition name="host" operator="equal">old.sajilni.com</condition><!-- put not equal instead of not equal for A B testing -->
<condition name="host" operator="equal">https://new.sajilni.com</condition><!-- put not equal instead of not equal for A B testing -->
<condition name="host" operator="equal">https://old.sajilni.com</condition><!-- put not equal instead of not equal for A B testing -->
<condition name="health-key" type="query-string" operator="notequal">health-key=4321</condition>
<from>^/(.*)</from>
<to type="permanent-redirect">https://www.sajilni.com/$1</to>
</rule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment