问题
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]
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?
回答1:
Add a =301
in your flags:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /special/service
RewriteRule ^(.+)$ http://clients.example.com/aff.php?aff=$1&p=service.php [R=301,NC]
来源:https://stackoverflow.com/questions/23706217/how-to-change-302-redirect-to-301-redirect-in-htaccess