提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等
温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的
[求助] 请问Apache下的htaccess为什么无效
htaccess 内容如下,放到public_html目录下没有效果,是不是格式不对?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Options -Indexes
<filesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=259200000, public"
</filesMatch>
<filesMatch "\.(js|css|pdf)$">
Header set Cache-Control "max-age=7200, public"
</filesMatch>
<filesMatch "\.(txt|xml)$">
Header set Cache-Control "max-age=3600, public, must-revalidate"
</filesMatch>
<FilesMatch "\.(html|htm|xhtml)$">
Header set Cache-Control "max-age=6, private, proxy-revalidate"
</filesMatch>
<filesMatch "\.(pl|php|cgi|spl)$">
Header unset Cache-Control
Header unset Expires
Header unset Last-Modified
FileETag None
Header unset Pragma
</filesMatch>
AddType application/octet-stream .pdf
AddType application/octet-stream .zip
AddType application/octet-stream .mov
AddType 'application/xhtml+xml; charset=UTF-8' xhtml
AddDefaultCharset UTF-8
AddType application/x-httpd-php php php3 php4 php5 php6 html
<Files sitemap.xml>
Header set X-Robots-Tag "noindex"
</Files>
# 没有www的网址或者子域名301永久转向到有www的网址并且忽略查询字符串
RewriteCond %{HTTP_HOST} !^www\.weixingon\.com$ [NC]
RewriteRule ^(.*)$ http://www.xxx.com/$1? [L,R=301]
RewriteCond %{http_host} ^000.000.00.00 [NC]
RewriteRule ^(.*)$ http://www.xxx.com/$1 [L,R=301]
# htm结尾的网址301转到html结尾的同名网址
RedirectMatch 301 ^(.*)\.htm$ http://www.xxx.com$1.html
# index.html结尾的网址301转到斜杠结尾的网址
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html$ http://www.xxx.com/$1 [L,R=301]
# index.php 重定向到 index.html
RewriteRule index.html$ index.php [PT]
</IfModule> |