码迷,mamicode.com
首页 > 数据库 > 详细

Apache服务器 htaccess 完整备份

时间:2014-08-18 10:48:43      阅读:248      评论:0      收藏:0      [点我收藏+]

标签: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>

Apache服务器 htaccess 完整备份,布布扣,bubuko.com

Apache服务器 htaccess 完整备份

标签:apache   htaccess   

原文地址:http://blog.csdn.net/default7/article/details/38656467

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!