QetriX/PHP/master/.htaccess - Htaccess File


# Copyright (c) QetriX.com. Licensed under MIT License, see /LICENSE.txt file.
# 17.04.14 | Apache .htaccess file for QetriX PHP.
# Tested by http://htaccess.madewithlove.be

# [NC] = Ignore Case, [L] = Last, [QSA] = Query String Append, [B] = Escape Backreferences, [R] = Redirect
# https://httpd.apache.org/docs/trunk/rewrite/flags.html

# Speed Tip: Turn Off ETags
FileETag none

# Turn on RewriteEngine
RewriteEngine On

# Uncomment the line below for non-localhost
#RewriteBase /

# Allows Tests
RewriteCond %{REQUEST_URI} tests/(.*).php$
RewriteRule ^(.*) $1 [L,QSA]

# Allows HTML, PHP and QUE files to be processed by qetrix.php
RewriteCond %{REQUEST_URI} (.*)(.html|.php|.que)$ [NC]
RewriteCond %{REQUEST_URI} !(.*)(file.php)$ [NC]
RewriteRule ^(.*) qetrix.php?_p=$1 [L,QSA]

# Uncomment, if you want to process files by file.php
RewriteCond %{REQUEST_URI} .*(.).{1,4}$ [NC]
RewriteCond %{REQUEST_URI} !(.*)(css|js|jpg|png|gif|ico)$ [NC]
RewriteRule ^(.*) libs/file.php?_p=$1 [L,QSA]

# Uncomment, if you want to process data by file.php
RewriteCond %{REQUEST_URI} (.*)/data/(.*)$ [NC]
RewriteRule ^(.*) libs/file.php?_p=$1 [L,QSA]

# Process pretty URLs
RewriteCond %{REQUEST_URI} !.*(.).{1,4}$ [NC]
RewriteRule ^(.*) qetrix.php?_p=$1 [L,QSA,B]

On Github License


Download PDF of Htaccess file