如何在htaccess中将302重定向更改为301重定向?

时间:2014-05-17 00:00:09

标签: php apache .htaccess mod-rewrite redirect

这是我在.htaccess中的代码:

Options +FollowSymlinks
RewriteEngine on
RewriteBase /special/service
RewriteRule ^(.+)$  http://clients.example.com/aff.php?aff=$1&p=service.php [R,NC]

当我在运行FireBug时进行重定向时,我发现由于某种原因,它实际上是302重定向。我需要更改什么来解决这个问题?

1 个答案:

答案 0 :(得分:0)

在你的旗帜中添加=301

Options +FollowSymlinks
RewriteEngine on
RewriteBase /special/service
RewriteRule ^(.+)$  http://clients.example.com/aff.php?aff=$1&p=service.php [R=301,NC]