ghostry/Gadmin/master/.htaccess - Htaccess File

ghostry/Gadmin/master/.htaccess

#伪静态
<IfModule mod_rewrite.c> 
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [QSA,PT,L]
</IfModule>
#修改主页
DirectoryIndex index.php index.html index.htm
#修改上传文件限制
php_value upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 300
php_value max_input_time 300
#php_value memory_limit "150M"
#Gzip压缩
<IfModule mod_deflate.c>
    #AddOutputFilter DEFLATE html xml php js css  
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE application/html
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilter DEFLATE css
</IfModule>
#缓存控制1年和3天
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A86400
    <FilesMatch ".(ico|png|jpeg|jpg|gif|svg|ttf|woff|woff2|otf|eot|flv|swf)$">
        Header Set Cache-Control "max-age=31536000, public"
    </FilesMatch>
    <FilesMatch ".(js|css|html)$">
        Header Set Cache-Control "max-age=259200, public"
    </FilesMatch>
</IfModule>
#禁止列出目录
Options -Indexes
#默认语言
AddDefaultCharset UTF-8
DefaultLanguage zh-CN
#禁止访问.htaccess和.htpasswd
<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, REQUEST_FILENAME

Comments

Apache