Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. RewriteCond %{REQUEST_FILENAME} !-d
  2. RewriteCond %{REQUEST_FILENAME} !-f
  3. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*.html HTTP/
  4. RewriteRule ^(.*).html$ $1 [R=301,L]
  5.  
  6. <IfModule mod_rewrite.c>
  7. RewriteEngine On
  8. RewriteBase /
  9.  
  10. RewriteCond %{REQUEST_FILENAME} !-f
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteCond %{REQUEST_URI} ^.*..*$
  13. RewriteRule ^(.*)..*$ $1 [R,L]
  14.  
  15. RewriteCond %{REQUEST_FILENAME} !-f
  16. RewriteCond %{REQUEST_FILENAME} !-d
  17. RewriteCond %{REQUEST_URI} ^(.*)/$
  18. RewriteRule ^(.*)/$ $1 [R,L]
  19.  
  20. RewriteCond %{REQUEST_FILENAME} !-f
  21. RewriteCond %{REQUEST_FILENAME} !-d
  22. RewriteCond %{REQUEST_URI} !^/pages/
  23. RewriteRule ^(.*)$ pages/$1.html [L]
  24. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement