99精品国产综合久久久久五月天,免费观看欧美大片毛片不用播放器 ,AV无码理论片在线观看免费网站,国产精品国产成人国产三级

Board logo

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

作者: maas    時間: 2013-9-5 08:45     標題: 請問Apache下的htaccess為什么無效

htaccess 內(nèi)容如下,放到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永久轉(zhuǎn)向到有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結(jié)尾的網(wǎng)址301轉(zhuǎn)到html結(jié)尾的同名網(wǎng)址
RedirectMatch 301 ^(.*)\.htm$ http://www.xxx.com$1.html

# index.html結(jié)尾的網(wǎng)址301轉(zhuǎn)到斜杠結(jié)尾的網(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://fudaan.com/bbs/) Powered by Discuz! 7.2