Wordpress 在.htaccess中使用.htm重定向301不';行不通
对于一个网站,我制作了一个.htaccess文件,其中包含大约50个重定向。不幸的是,大多数都不起作用。似乎有一种模式: 这很有效Wordpress 在.htaccess中使用.htm重定向301不';行不通,wordpress,.htaccess,redirect,http-status-code-301,Wordpress,.htaccess,Redirect,Http Status Code 301,对于一个网站,我制作了一个.htaccess文件,其中包含大约50个重定向。不幸的是,大多数都不起作用。似乎有一种模式: 这很有效 Redirect 301 /news/news http://levelav.nl/news/ 这不起作用 Redirect 301 /staff/staff.htm http://levelav.nl/people/ 在重定向之前,我放置了以下代码: # BEGIN WordPress <IfModule mod_rewrite.c> Rewri
Redirect 301 /news/news http://levelav.nl/news/
这不起作用
Redirect 301 /staff/staff.htm http://levelav.nl/people/
在重定向之前,我放置了以下代码:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Send other domains to www.levelav.nl
RewriteCond %{HTTP_HOST} !levelav.nl$ [NC]
RewriteRule ^(.*)$ http://www.levelav.nl/$1 [L,R=301]
# Send other domains to levelav.nl
RewriteCond %{HTTP_HOST} !levelav.nl$ [NC]
RewriteRule ^(.*)$ http://levelav.nl/$1 [L,R=301]
# Some WP rules
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
#开始WordPress
重新启动发动机
重写基/
#将其他域发送到www.levelav.nl
重写cond%{HTTP_HOST}!levelav.nl$[NC]
重写规则^(.*)$http://www.levelav.nl/$1[L,R=301]
#将其他域发送到levelav.nl
重写cond%{HTTP_HOST}!levelav.nl$[NC]
重写规则^(.*)$http://levelav.nl/$1[L,R=301]
#一些WP规则
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress
有人看到或知道我做错了什么吗