arnia/Karybu/master/.htaccess - Htaccess File

arnia/Karybu/master/.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} .(css|js|gif|ico|jpg|jpeg)$ [NC]
    RewriteRule .* - [L]

    # reserve Karybu Layout Template Source File (*.html)
    RewriteRule ^(layouts|m.layouts)/(.+).html$ - [L,F]
    # reserve Karybu Template Source Files (*.html)
    RewriteCond %{REQUEST_URI} !/modules/editor/
    RewriteRule /(skins|m.skins)/(.+).html$ - [L,F]

    # conf, query, schema
    RewriteRule ^(modules|addons|widgets)/(.+)/(conf|queries|schemas)/(.+).xml$ ./index.php [L]

    # static files
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteRule ^(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*) ./files/$2/$3 [L]
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteRule ^(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*) ./$2/$3 [L]

    # rss , blogAPI
    RewriteRule ^(rss|atom)$ ./index.php?module=rss&act=$1 [L]
    RewriteRule ^([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?mid=$1&act=$2 [L]
    RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?vid=$1&mid=$2&act=$3 [L]

    # trackback
    RewriteRule ^([0-9]+)/(.+)/trackback$ ./index.php?document_srl=$1&key=$2&act=trackback [L]
    RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?mid=$1&document_srl=$2&key=$3&act=trackback [L]
    RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&document_srl=$2&key=$3&act=trackback [L]
    RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&mid=$2&document_srl=$3&key=$4&act=trackback [L]

    #shop / vid / [category|product] / identifier
    #RewriteCond %{SCRIPT_FILENAME} !-f
    # shop products and categories
     RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_.-]+)$ ./index.php?act=route&vid=$1&type=$2&identifier=$3 [L,QSA]

    # redirect missing images to 404 without passing through the internal router.
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteRule .(jpg|jpeg|png|gif|ico|swf|bmp)$ - [nocase,redirect=404,last]

    # admin needs to be treated separately, because there is also a folder named admin
    RewriteRule ^admin$ ./index.php/admin [L]
    RewriteRule ^admin/(.*)$ ./index.php/admin/$1 [L]

    #RewriteRule ^([A-Za-z0-9-_]+)$ ./index.php/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) ./index.php/$1 [L]
</IfModule>
#deny access to log files
<Files  ~ ".log$">
  Order allow,deny
  Deny from all
</Files>
#restrict access to directory listing
Options -Indexes

## document permanent link
#RewriteRule ^([0-9]+)$ ./index.php?document_srl=$1 [L,QSA]
#
## mid link
#RewriteCond %{SCRIPT_FILENAME} !-d
#RewriteRule ^([a-zA-Z0-9_]+)/?$ ./index.php?mid=$1 [L,QSA]
## mid + document link
#RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?mid=$1&document_srl=$2 [L,QSA]
#
## vid + mid link
#RewriteCond %{SCRIPT_FILENAME} !-d
#RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ ./index.php?vid=$1&mid=$2 [L,QSA]
## vid + mid + document link
#RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?vid=$1&mid=$2&document_srl=$3 [L,QSA]
#
## mid + entry title
#RewriteRule ^([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?mid=$1&entry=$2 [L,QSA]
## vid + mid + entry title
#RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?vid=$1&mid=$2&entry=$3 [L,QSA]
#

On Github License

Files

Download PDF of Htaccess file
DOCUMENT_ROOT, REQUEST_FILENAME, REQUEST_URI, SCRIPT_FILENAME, static

Comments

Apache