pvorb/php-yuki/master/public/.htaccess
#############################################################
### For detail information on mod_rewrite see ###
### http://httpd.apache.org/docs/3.2/mod/mod_rewrite.html ###
#############################################################
RewriteEngine On
RewriteBase /
AddDefaultCharset utf-8
##################################
# Handle Subdomains
##################################
## For example:
## Real domain. Catches sub.domain.com.
# RewriteCond %{HTTP_HOST} ^sub.domain.com [OR]
## Testing at localhost. Catches sub.localhost.
# RewriteCond %{HTTP_HOST} ^sub.localhost
## Internally map to manager.php?dir&url=path/to/subdomain/*.
# RewriteRule ^(.*)$ manager.php?dir&url=path/to/subdomain/$1 [L,QSA,NC]
##################################
# Handle Real domains
##################################
## For example:
## Real domain domain.com
# RewriteCond %{HTTP_HOST} ^domain.com$
## Map domain.com to www.domain.com (or vice versa).
# RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
##################################
# Handle directories
##################################
# Map /dir to /dir/, if /dir/ is a directory.
RewriteCond %{REQUEST_FILENAME}/ -d
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ /$1/ [L,R=301]
# Map path/to/file to manager.php?dir&url=path/to/file.
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} (.*)/$
RewriteRule ^(.*)$ manager.php?dir&url=$1 [L,QSA,NC]
##################################
# Handle files
##################################
# Redirect file.html to file.
RewriteRule ^(.*).html$ /$1 [L,R=301]
# Redirect path/index to path/. Remove index, because it is unnessecary.
RewriteRule ^((.*/)*)index$ /$1 [L,R=301]
# Redirect file/ to file.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Map path/to/file to manager.php?file&url=path/to/file, if the file exists.
RewriteCond %{REQUEST_FILENAME}.html -f [OR]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ manager.php?file&url=$1 [L,QSA,NC]
# Map bad requests to manager.php?err&url=path/to/file, if the file does not exist.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}/ !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.html !-f
RewriteRule ^(.*)$ manager.php?err&url=$1 [L,QSA,NC]
On Github License
Files