Skip to content

Instantly share code, notes, and snippets.

@neotohin-snippet
Created December 21, 2012 14:00
Show Gist options
  • Save neotohin-snippet/4353006 to your computer and use it in GitHub Desktop.
Save neotohin-snippet/4353006 to your computer and use it in GitHub Desktop.
htaccess:redirection
# Redirect root to /exploreap URI
RewriteRule ^$ /exploreap [R=301]
# Rewrite HTTP to HTTPS on some pages and sections
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} /user [NC,OR]
RewriteCond %{REQUEST_URI} /admin [NC,OR]
RewriteCond %{REQUEST_URI} ^/exploreap/thank-you-for-subscribing$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment