我不是程序员,我正在努力解决我们的.htaccess文件出了什么问题。
谷歌正在www.domain.co.uk& domain.co.uk我认为编写.htaccess的方式可以解决这个问题,但事实并非如此。 (网站管理员工具设置为www。用于每页上的首选和规范链接。)
其次,我对Zoompf& amp;它给出了很多发现,其中很多是以htaccess为基础的。
如果有人可以盯着下面的文件(附加说明),请给我一些指示,我真的很感激吗?
非常感谢
戴夫
options -Indexes
<FilesMatch ".(html|htm|php)$">
Header set Cache-Control "max-age=3600"
</FilesMatch>
Redirect /sexy http://www.blushlingerie.co.uk/underwear
Redirect /pages http://www.blushlingerie.co.uk/underwear
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
options Indexes FollowSymLinks Includes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^blushlingerie.co.uk [nc]
rewriterule ^(.*)$ http://www.blushlingerie.co.uk/$1 [r=301,nc]
options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.blushlingerie.co.uk [R=301,L]
答案 0 :(得分:0)
索引问题
options -Indexes
应该是
Options -Indexes
Wordpress的.htaccess should only be:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
删除www can be done,如下所示:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]