chilieu/cbsh/master/.htaccess - Htaccess File

chilieu/cbsh/master/.htaccess

RewriteEngine on

# force trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/?$
RewriteCond %{REQUEST_URI}  !.(html|jpg|jpeg|gif|png|css|js)$
RewriteRule ^(.*[^/])$ http://%{HTTP_HOST}/$1/ [L,R=301]

# force www
RewriteCond %{HTTP_HOST} ^[^.]+.[^.]+$
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# force https
#RewriteCond %{HTTPS} !=on
#RewriteCond %{HTTP_HOST} !^loanzify$
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# all requests to code igniter index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?/$0 [PT,L]

On Github License

Files

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

Comments

Apache