簡體   English   中英

如何在htaccess中將302重定向改為301重定向?

[英]How to Change 302 Redirect to 301 Redirect in htaccess?

這是我的 .htaccess 中的代碼:

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

當我在運行 FireBug 時進行重定向時,我發現它實際上是出於某種原因的 302 重定向。 我需要改變什么來解決這個問題?

在您的標志中添加=301

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM