Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://www.example.com/index.php/about
- http://example.com/index.php/about
- http://www.example.com/about
- http://example.com/about
- inanzzz@ubuntu:/etc/apache2/sites-enabled$ sudo nano 000-default.conf
- <VirtualHost *:80>
- ServerAdmin webmaster@localhost
- DocumentRoot /var/www/html
- <Directory /var/www/html/>
- Options Indexes FollowSymLinks MultiViews
- # changed from None to FileInfo
- AllowOverride FileInfo
- Order allow,deny
- allow from all
- </Directory>
- ErrorLog ${APACHE_LOG_DIR}/error.log
- CustomLog ${APACHE_LOG_DIR}/access.log combined
- </VirtualHost>
- RewriteEngine On
- RewriteRule ^index.php$ / [R=301,L]
- RewriteRule ^(.*)/index.php$ /$1/ [R=301,L]
- Options +FollowSymlinks -MultiViews
- RewriteEngine on
- RewriteCond %{HTTP_HOST} !^www. [NC]
- RewriteCond %{REQUEST_URI} ^(.*/)index.html$ [NC]
- RewriteRule . http://www.%{HTTP_HOST}%1 [R=301,NE,L]
- RewriteCond %{HTTP_HOST} !^www. [NC]
- RewriteRule . http://www.%{HTTP_HOST}%{REQUEST_URI} [NE,R=301,L]
- RewriteCond %{REQUEST_URI} ^(.*/)index.php$ [NC]
- RewriteRule . %1 [R=301,NE,L]
- RewriteEngine On
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*).php$ /$1 [L,R=301]
- RewriteEngine On
- RewriteCond %{REQUEST_URI} index.php
- RewriteRule ^(.*)index.php$ /$1/ [R=301,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement