四虎影视在线影院在线观看,小s货再浪些再咬紧点h,国产精品水嫩水嫩,97精产国品一二三产区

Board logo

標題: [求助] 請問Apache下的htaccess為什么無效 [打印本頁]

作者: maas    時間: 2013-9-5 08:45     標題: 請問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的網(wǎng)址或者子域名301永久轉向到有www的網(wǎng)址并且忽略查詢字符串
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結尾的網(wǎng)址301轉到html結尾的同名網(wǎng)址
RedirectMatch 301 ^(.*)\.htm$ http://www.xxx.com$1.html

# index.html結尾的網(wǎng)址301轉到斜杠結尾的網(wǎng)址
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>
作者: admin    時間: 2013-9-5 09:10

RewriteBase /
去掉這個試試
作者: 藤真    時間: 2014-4-15 12:56

RewriteBase /
去掉這個試試,我的wp確實是可以正常訪問,但是有些功能不能使用了。。郁悶。




歡迎光臨 WDlinux官方論壇 (http://cd-genova.com/bbs/) Powered by Discuz! 7.2