jasonsnider/jasonsnider.com/master/webroot/.htaccess - Htaccess File

jasonsnider/jasonsnider.com/master/webroot/.htaccess

# Apache Server Configs v2.6.0 | MIT License
# https://github.com/h5bp/server-configs-apache

# (!) Using `.htaccess` files slows down Apache, therefore, if you have access
# to the main server config file (usually called `httpd.conf`), you should add
# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html.

# Modified from
# https://raw.githubusercontent.com/h5bp/html5-boilerplate/master/.htaccess
# https://github.com/cakephp/cakephp/blob/master/.htaccess

# ##############################################################################
# # URL REWRITES                                                               #
# ##############################################################################
# ------------------------------------------------------------------------------
# | Rewrite engine                                                             |
# ------------------------------------------------------------------------------

# Turning on the rewrite engine and enabling the `FollowSymLinks` option is
# necessary for the following directives to work.

# If your web host doesn't allow the `FollowSymlinks` option, you may need to
# comment it out and use `Options +SymLinksIfOwnerMatch` but, be aware of the
# performance impact: http://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks

# Also, some cloud hosting services require `RewriteBase` to be set:
# http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-mod-rewrite-not-working-on-my-site
<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    # Options +SymLinksIfOwnerMatch
    RewriteEngine On
    # RewriteBase /
</IfModule>

# ------------------------------------------------------------------------------
# | Pretty URLs                                                             |
# ------------------------------------------------------------------------------
# "Pretty URL" support - pushes all requests into index.php (assuming that asset does not exist in webroot)
<IfModule mod_rewrite.c>    
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
SCRIPT_FILENAME

Comments

Apache