sebastienheyd/php-oxygen/master/www/.htaccess - Htaccess File

sebastienheyd/php-oxygen/master/www/.htaccess

############################################
## Define the application environment. This will set the config file to use for the application.
## Ex : "development" => webapp/config/config.development.xml
##
## If commented, the application will use the default environment.
## You can already set the variable into your apache vhost configuration.
##
## See oxygen/core/config.class.php

#SetEnv APP_ENV "development"

############################################
## Some PHP stuff

# Disable folders display
    Options -indexes

# default encoding to utf-8
    AddDefaultCharset "utf-8"

<IfModule mod_php5.c>

    # error_reporting
    php_value error_reporting "-1"

    # default gpc_magic_quotes
    php_value magic_quotes_gpc 0

    # default encoding to utf-8
    php_value default_charset "utf-8"

    # no globals
    php_value register_globals off

    # no session id in the URL (session fixation)
    php_flag session.use_trans_sid off
    php_flag session.use_only_cookies on

</IfModule>

############################################
## Always force latest IE rendering engine & Chrome Frame

<IfModule mod_headers.c>
    BrowserMatch MSIE ie
    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
</IfModule>

############################################
## Rewrite rules

# enable rewrites
RewriteEngine on

# path relative to web root
RewriteBase /

# parse, compile and process assets
# comment if you want to use assets directly from the www folder
RewriteRule ^([0-9]*)/(.*.(?:css|less|js))$ index.php?asset=/$2    [L,QSA,NC]
RewriteRule ^(.*.(?:css|less|js))$ index.php?asset=/$1             [L,QSA,NC]

# never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# rewrite everything else to index.php
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

On Github License

Files

Download PDF of Htaccess file
ENV, REQUEST_FILENAME

Comments

Apache