Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. # Apache Rewrite Rules
  2. <IfModule mod_rewrite.c>
  3. Options +FollowSymLinks
  4. RewriteEngine On
  5. RewriteBase /
  6.  
  7. # Add trailing slash to url
  8. RewriteCond %{REQUEST_FILENAME} !-f
  9. RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/|#(.*))$
  10. RewriteRule ^(.*)$ $1/ [R=301,L]
  11.  
  12. # Remove .php-extension from url
  13. RewriteCond %{REQUEST_FILENAME} !-d
  14. RewriteCond %{REQUEST_FILENAME}.php -f
  15. RewriteRule ^([^.]+)/$ $1.php
  16.  
  17. # Remove .html-extension from url
  18. RewriteCond %{REQUEST_FILENAME} !-d
  19. RewriteCond %{REQUEST_FILENAME}.html -f
  20. RewriteRule ^([^.]+)/$ $1.html
  21.  
  22.  
  23. # End of Apache Rewrite Rules
  24. </IfModule>
  25.  
  26. RewriteRule ^[A-Za-z0-9-]+/([A-Za-z0-9-]+)/?$ polls.php?poll=$1 [NC,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement