rick-stevens/umvc/master/.htaccess - Htaccess File

rick-stevens/umvc/master/.htaccess

#########################
 ## µMVC: git.io/PKKsQg ##
#########################

ErrorDocument 400 /index.php?_error=400
ErrorDocument 401 /index.php?_error=401
ErrorDocument 403 /index.php?_error=403
ErrorDocument 404 /index.php?_error=404
ErrorDocument 500 /index.php?_error=500

<IfModule mod_autoindex.c>
  # Disable directory listing (safety)
  Options -Indexes
</IfModule>

<IfModule mod_rewrite.c>
  RewriteEngine On
  #RewriteBase /

  # Force the use of example.com over www.example.com (permanent redirect) (SEO)
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
  RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]

  # Remove trailing slash (permanent redirect) (SEO)
  DirectorySlash Off
  RewriteRule ^(.*)/$ /$1 [R=301,L]

  # Route everything except items listed below through index.php
  RewriteCond $1 !^(static/|index.php|robots.txt|humans.txt|sitemap.xml|crossdomain.xml|favicon.ico|apple-touch-icon-precomposed.png|browserconfig.xml|tile.png|tile-wide.png)
  RewriteRule ^(.*)$ index.php [L]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTPS, REQUEST_URI, static

Comments

Apache