elementfani/guestbook/master/web/.htaccess
Options +FollowSymLinks
RewriteEngine on
# remove trailing slash
RewriteRule ^(.*)/$ /$1 [R=301,L]
# remove index.php
RewriteCond %{THE_REQUEST} ^GET.*index.php [NC]
RewriteRule (.*?)index.php/*(.*) /$1$2 [R=301,NE,L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
# 301 redirect
RewriteCond %{HTTP_HOST} ^www.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
On Github License
Files