Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. http://www.example.com/index.php/about
  2. http://example.com/index.php/about
  3.  
  4. http://www.example.com/about
  5. http://example.com/about
  6.  
  7. inanzzz@ubuntu:/etc/apache2/sites-enabled$ sudo nano 000-default.conf
  8.  
  9. <VirtualHost *:80>
  10. ServerAdmin webmaster@localhost
  11. DocumentRoot /var/www/html
  12.  
  13. <Directory /var/www/html/>
  14. Options Indexes FollowSymLinks MultiViews
  15. # changed from None to FileInfo
  16. AllowOverride FileInfo
  17. Order allow,deny
  18. allow from all
  19. </Directory>
  20.  
  21. ErrorLog ${APACHE_LOG_DIR}/error.log
  22. CustomLog ${APACHE_LOG_DIR}/access.log combined
  23. </VirtualHost>
  24.  
  25. RewriteEngine On
  26. RewriteRule ^index.php$ / [R=301,L]
  27. RewriteRule ^(.*)/index.php$ /$1/ [R=301,L]
  28.  
  29. Options +FollowSymlinks -MultiViews
  30.  
  31. RewriteEngine on
  32.  
  33. RewriteCond %{HTTP_HOST} !^www. [NC]
  34. RewriteCond %{REQUEST_URI} ^(.*/)index.html$ [NC]
  35. RewriteRule . http://www.%{HTTP_HOST}%1 [R=301,NE,L]
  36.  
  37. RewriteCond %{HTTP_HOST} !^www. [NC]
  38. RewriteRule . http://www.%{HTTP_HOST}%{REQUEST_URI} [NE,R=301,L]
  39.  
  40. RewriteCond %{REQUEST_URI} ^(.*/)index.php$ [NC]
  41. RewriteRule . %1 [R=301,NE,L]
  42.  
  43. RewriteEngine On
  44. RewriteCond %{REQUEST_FILENAME} !-f
  45. RewriteCond %{REQUEST_FILENAME} !-d
  46. RewriteRule ^(.*).php$ /$1 [L,R=301]
  47.  
  48. RewriteEngine On
  49. RewriteCond %{REQUEST_URI} index.php
  50. RewriteRule ^(.*)index.php$ /$1/ [R=301,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement