我的網站才換成易優cms的目前使用的偽靜態,以前用的dede是全站生成靜態的,百度中有一個排名是收錄的靜態頁面,htaccess中配置了301轉向沒有成功,
這樣配置的,在瀏覽http://www.XXX.cn/index.html的時候還是沒有自動跳轉到http://www.XXX.cn/
我現在根目錄中臨時手動創建了一個index.html不然用戶在百度搜索點擊進去就是404頁面,
請問各位大俠,改如何正確配置301轉向直接將http://www.XXX.cn/index.html轉到http://www.XXX.cn/,請附上代碼,十分感謝。
以下是目前htaccess代碼,
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
#http跳轉到https
#RewriteCond %{HTTP_HOST} ^www.xxx.cn$
#RewriteRule ^/index.html$ http://www.xxx.cn [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
#RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
#禁止指定腳本的運行
RewriteCond % !^$
RewriteRule data/(.*).(php|php3|php4|php5|php6|php7|pht|phtml|asp|aspx|jsp|exe|js|sql|perl|cgi|asa)$ – [F]
RewriteRule template/(.*).(php|php3|php4|php5|php6|php7|pht|phtml|asp|aspx|jsp|exe|perl|cgi|asa)$ – [F]
RewriteRule uploads/(.*).(php|php3|php4|php5|php6|php7|pht|phtml|asp|aspx|jsp|exe|js|perl|cgi|asa)$ – [F]
</IfModule>