Guest User

Untitled

a guest
Feb 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. Options +FollowSymlinks
  3. RewriteEngine On
  4.  
  5. # Block hidden directories
  6. RewriteRule "(^|/)." - [F]
  7.  
  8. # Prevent /health_check.php from using https
  9. RewriteCond %{REQUEST_URI} !(health_check.php)$
  10.  
  11. # Prevent /sns from using https but this DOES need codeigniter rewriting (see below)
  12. RewriteCond %{REQUEST_URI} !^/(sns)/
  13.  
  14. # Reroute http to https
  15. RewriteCond %{HTTP:X-Forwarded-Proto} =http
  16. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
  17.  
  18. # Prevent rewriting of domain for codeigniter
  19. RewriteCond %{REQUEST_FILENAME} !-f
  20. RewriteCond %{REQUEST_FILENAME} !-d
  21. RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
  22.  
  23. </IfModule>
Add Comment
Please, Sign In to add comment