如何在htaccess中将302重定向更改为301重定向? [英] How to Change 302 Redirect to 301 Redirect in htaccess?
本文介绍了如何在htaccess中将302重定向更改为301重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的.htaccess文件中的代码:
Here's the code I have in my .htaccess:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /special/service
RewriteRule ^(.+)$ http://clients.example.com/aff.php?aff=$1&p=service.php [R,NC]
当我在运行FireBug时进行重定向时,出于某种原因,我发现它实际上是302重定向.我需要更改以解决此问题?
When I go the my redirect while running FireBug I'm seeing that it's actually a 302 redirect for some reason. What do I need to change to fix this?
推荐答案
在您的标志中添加=301
:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /special/service
RewriteRule ^(.+)$ http://clients.example.com/aff.php?aff=$1&p=service.php [R=301,NC]
这篇关于如何在htaccess中将302重定向更改为301重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文