Guest User

Untitled

a guest
Jul 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. AddDefaultCharset utf-8
  2. Options +FollowSymLinks -Indexes
  3. DirectorySlash Off
  4.  
  5. <IfModule mod_rewrite.c>
  6. RewriteEngine On
  7. RewriteBase /
  8.  
  9. RewriteCond %{REQUEST_FILENAME} !-d
  10. RewriteCond %{REQUEST_URI} (.+)/$
  11. RewriteRule ^(.*)$ /$1 [R=301,L]
  12.  
  13. RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
  14. RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  15.  
  16. RewriteCond %{REQUEST_FILENAME} !-d
  17. RewriteCond %{THE_REQUEST} ^GET /[^?s]+.html
  18. RewriteRule (.*).html$ /$1 [L,R=301]
  19.  
  20. RewriteCond %{REQUEST_FILENAME} !-d
  21. RewriteRule (.*)/$ $1.html [L]
  22.  
  23. # Remove trailing slash:
  24. RewriteRule (.*)/$ $1 [L,R=301]
  25.  
  26. # Now test without the trailing slash:
  27. RewriteCond %{REQUEST_FILENAME}.html -f
  28. RewriteRule . %{REQUEST_FILENAME}.html [QSA,L]
  29.  
  30. RewriteRule ^(.*)index.(html?)$ /$1 [R=301,NC,L]
  31. </IfModule>
  32.  
  33. <Files .htaccess>
  34. order allow,deny
  35. deny from all
  36. </Files>
  37.  
  38. ErrorDocument 404 /404.html
  39. ErrorDocument 403 /404.html
Add Comment
Please, Sign In to add comment