dmitrymomot/slim-quickstart/master/public/.htaccess
### Turn on URL rewriting
# ----------------------------------------------------------------
RewriteEngine On
### Set default charset
# ----------------------------------------------------------------
AddDefaultCharset utf-8
### Installation directory
# ----------------------------------------------------------------
RewriteBase /
### redirect from www to non-www
# ----------------------------------------------------------------
# RewriteCond %{HTTP_HOST} ^www.site.com$
# RewriteRule (.*) http://site.com/$1 [R=301,L]
# RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.html HTTP/
# RewriteRule ^index.html$ http://site.com/ [R=301,L]
# RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
# RewriteRule ^index.php$ http://site.com/ [R=301,L]
### Protect hidden files from being viewed
# ----------------------------------------------------------------
<Files .*>
Order Deny,Allow
Deny From All
</Files>
### Protect application and system files from being viewed
# ----------------------------------------------------------------
RewriteRule ^(?:app|vendor)b.* index.php/$0 [L]
### Allow any files or directories that exist to be displayed directly
# ----------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
### Rewrite all other URLs to index.php/URL
# ----------------------------------------------------------------
RewriteRule .* index.php/$0 [PT]
On Github License
Files