Advertisement
Guest User

Untitled

a guest
Jul 21st, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. <IfModule mod_negotiation.c>
  3. Options -MultiViews
  4. </IfModule>
  5.  
  6. RewriteEngine On
  7.  
  8. #Force SSL && Force NON-WWW
  9.  
  10. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  11. RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
  12. RewriteCond %{HTTPS} !on
  13. RewriteCond %{REQUEST_URI} !^/excluded-folder/.*$
  14. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  15.  
  16. # Redirect Trailing Slashes If Not A Folder...
  17. RewriteCond %{REQUEST_FILENAME} !-d
  18. RewriteRule ^(.*)/$ /$1 [L,R=301]
  19.  
  20. # Handle Front Controller...
  21. RewriteCond %{REQUEST_FILENAME} !-d
  22. RewriteCond %{REQUEST_FILENAME} !-f
  23. RewriteRule ^ index.php [L]
  24.  
  25. # Handle Authorization Header
  26. RewriteCond %{HTTP:Authorization} .
  27. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  28. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement