delafuente/tauframework/master/.htaccess - Htaccess File

delafuente/tauframework/master/.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

Options -Indexes

ServerSignature Off

#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*[^/])$ $1/ [L,R=301]

#Add trailing slash to folders
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !..+$
#RewriteCond %{REQUEST_URI} !/$
#RewriteRule (.*) http://%{HTTP_HOST}/$1/ [L,R=301]

#ErrorDocument 404 /404/

RewriteCond %{REQUEST_URI} !(js|css|imagesu)
RewriteCond %{REQUEST_URI} !(.css|.js|.png|.jpg|.jpeg|.gif|.ico|.font|.ttf|robots.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/imagesu
RewriteCond %{REQUEST_URI} !^/tau/
RewriteRule . index.php
#RewriteRule ^(.*)$ index.php?request=$1 [L,QSA]

#RewriteCond %{REQUEST_URI} !..+$
#RewriteCond %{REQUEST_URI} !/$

#Remove always trailing slash. The next rule is the opposite
#RewriteRule ^(.*)/$ $1 [R=301,L]

#Add trailing slash to folders
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !..+$
#RewriteCond %{REQUEST_URI} !/$
#RewriteRule (.*) http://%{HTTP_HOST}/$1/ [L,R=301]

#Redirect calls to images, js and css, all langs
#RewriteRule ^(.*)images/(.*)$ images/$2 [NC,L]
#RewriteRule ^(.*)uploads/(.*)$ uploads/$2 [NC,L]
#RewriteRule ^(.*)font/(.*)$ font/$2 [NC,L]
#RewriteRule ^(.*)css/(.*)$ css/$2 [NC,L]
#RewriteRule ^(.*)js/(.*)$ http://%{HTTP_HOST}/js/$2 [NC,L]
#RewriteRule ^(.*)gallery/(.*)$ gallery.php?path=$2 [NC,L]

#Disable php execution inside images folder
#Uncomment this if you want to use it. Put here or in your VirtualHost file
#<Directory "/path/to/your/app/uploads">
#   # Ignore .htaccess files
#   AllowOverride None
#
#   # Serve HTML as plaintext, don't execute SHTML
#   AddType text/plain .html .htm .shtml .php
#
#   # Don't run arbitrary PHP code.
#   php_admin_flag engine off
#
#   # If you've other scripting languages, disable them too.
#</Directory>

#RewriteRule ^[a-z]{2}/$ index.php?lang=$1 [NC,L]

#Redirect php files, and do other parse ( not L clause )
#RewriteRule ^[a-z]{2}/(.*.php)$ $1/$2/ [NC]

#Redirect not matched like a folder, and do other parse ( not L clause )
#RewriteRule ^[a-z]{2}/(.*)$ $1/$2/

#Redirect all es/name folders to php files counterpart, es/name -> /name.php?lang=es
#RewriteRule ^[a-z]{2}/(.*)/(.*)$ $2.php$3 [NC,L]

</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, REQUEST_FILENAME, REQUEST_URI

Comments

Apache