JerryDev/toolkit/master/config/Apache24/.htaccess - Htaccess File

JerryDev/toolkit/master/config/Apache24/.htaccess

<IfModule mod_rewrite.c>

    #    (From: Laravel)
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes... 重定向拖尾的斜杠 (From: Laravel)
    RewriteRule ^(.*)/$ /$1 [R=301,L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]

    # Handle Front Controller... 单一入口,RESTful web (From: Laravel)
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule ^ index.php [L]

    # 单一入口 (from: Filght framework)
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule ^(.*)$ index.php [QSA,L]

    # 去掉URL里的入口文件index.php (From: ThinkPHP)
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

    # 伪静态 实现了控制器和方法两层分发和其他var参数 (self define)
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule ^(.*?)/(.*)?? index.php?p=$1&m=$2 [QSA,PT,L]

    # QSA  保留原有URL参数(query string append)
    # PT   为了第二次redirect时能正确识别
    # L    立即执行,不向后匹配

</IfModule>

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME

Comments

Apache