Skip to content

Instantly share code, notes, and snippets.

@tanzilhuda
Last active December 9, 2017 08:21
Show Gist options
  • Save tanzilhuda/b00e5bd840daae8c58f274edcb87ab56 to your computer and use it in GitHub Desktop.
Save tanzilhuda/b00e5bd840daae8c58f274edcb87ab56 to your computer and use it in GitHub Desktop.
remove index.php and https setup
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?)
RewriteRule ^ /%1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment