dskeba/Swift-PHP/master/.htaccess - Htaccess File

dskeba/Swift-PHP/master/.htaccess

# Turn the Apache rewrite engine on
RewriteEngine On

# Specify our directory for rewrites
RewriteBase /

# Remove the www prefix
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,NC,L]

# Remove multiple slashes anywhere
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule ^(.*)$ $1 [R=301,NC,L]

# Add a single trailing slash if not present
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [R=301,NC,L]

# Load up the index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]

On Github License

Files

Download PDF of Htaccess file
GET, HTTP_HOST, REQUEST_FILENAME, REQUEST_METHOD, REQUEST_URI

Comments

Apache