Apache服务器 htaccess 完整备份
<Files *> Options -Indexes </Files> <IfModule mod_headers.c> <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=2592000, public" </FilesMatch> <FilesMatch "\.(xml|txt)$"> Header set Cache-Control "max-age=604800, public, max-age" </FilesMatch> <FilesMatch "\.(html|htm|php|shtml)$"> Header set Cache-Control "max-age=18000, max-age" </FilesMatch> </IfModule> <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ # RewriteCond %{REQUEST_URI} !\.html$ RewriteRule ^(.*)$ /$1/ [L,R=301] #RewriteCond %{HTTP_HOST} !^(m.zbphp.com|localhost|demo|192.168.) [NC] #RewriteRule ^(.*)$ http://m.zbphp.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。