Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. RewriteEngine On
  2.  
  3. # Force www
  4. RewriteCond %{HTTP_HOST} !^$
  5. RewriteCond %{HTTP_HOST} !^www\. [NC]
  6. RewriteCond %{HTTPS}s ^on(s)|
  7. RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  8.  
  9. # Force SSL
  10. RewriteCond %{HTTPS} off
  11. RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L,NE]
  12.  
  13. RewriteBase /
  14. RewriteCond %{REQUEST_FILENAME} !-f
  15. RewriteCond %{REQUEST_FILENAME} !-d
  16. RewriteRule ^(.*)/$ p.php?q=$1 [QSA,L]
  17. RewriteRule ^$ p.php?q=index [QSA,L]
  18.  
  19. ErrorDocument 403 /404.html
  20. ErrorDocument 404 /403.shtml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement