Skip to content

Instantly share code, notes, and snippets.

@ngstigator
Last active April 25, 2017 16:44
Show Gist options
  • Save ngstigator/71ff177fff1940ccd3a739ca340a30d6 to your computer and use it in GitHub Desktop.
Save ngstigator/71ff177fff1940ccd3a739ca340a30d6 to your computer and use it in GitHub Desktop.
# https://wiki.apache.org/httpd/RewriteQueryString
# Enforce HTTPS
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/secure-me-1 [NC,OR]
RewriteCond %{REQUEST_URI} ^/secure-me-2 [NC]
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
# re-use variable
RewriteCond %{QUERY_STRING} zoom_query=(.*)$
RewriteRule ^search/search\.php$ /?s=%1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment