Htaccess File

chrismademe/php-starter/master/public_html/.htaccess

HTTP_HOST, REQUEST_FILENAME, REQUEST_URI
# Enable PHP 5.4
# AddType application/x-httpd-php54 .php

RewriteEngine on

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

## Push everything through index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*)$ /index.php?path=$1 [NC,L,QSA]

# Deny Access to sensitive files directly.
<Files ~ "(.yml|.twig|.inc|.sql)">
    Order allow,deny
    Deny from all
</Files>

# Additional Security for htaccess
<Files .htaccess>
    Order allow,deny
    Deny from all
</Files>
Exit mobile version