2014-09-06 381 views
1

我想在Wordpress网站上实现一个简单的重定向。301重定向不正确重定向

这里是有问题的行:

Redirect 301 http://bureaudebureau.com http://bureaudebureau.com/category/furniture 

这里是我使用的整个.htaccess文件:

AddHandler php-stable .php 

Redirect 301 http://bureaudebureau.com http://bureaudebureau.com/category/furniture 

# 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 
+0

你确定你想从你的根网站的'301'(这是一个永久的重定向)到'/ category/furniture' sub文件夹 – 2014-09-06 19:43:20

+0

我希望访问者http://bureaudebureau.com被重定向到家具类别档案,是的。 – Melodist 2014-09-06 20:08:24

回答

0

如果你是肯定的,那么你可以通过这个替换当前的代码一个在你的htaccess

AddHandler php-stable .php 

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

RewriteRule ^$ category/furniture [R=301,L] 

RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

# END WordPress 
+1

是的!有效。谢谢。 – Melodist 2014-09-06 20:27:36

+0

很高兴它的工作,欢迎您! – 2014-09-06 20:27:49