hello there, I need to set 301 redirect for selected urls only. my old htaccess code is.... RewriteRule buy.php$ product.php?&%{QUERY_STRING} RewriteRule buy.php$ product_details.php?&%{QUERY_STRING} Code (markup): obviously for one url it was giving 404-soft error becuase of two buy.php so i changed one url as below..... RewriteRule [B]buy-now.php[/B]$ product.php?&%{QUERY_STRING} RewriteRule buy.php$ product_details.php?&%{QUERY_STRING} Code (markup): Now, google has already indexed old url. How do i set 301 redirect for old url to new buy-now.php???
RewriteRule buy-now.php$ product.php?&%{QUERY_STRING} [R=301,L] RewriteRule buy.php$ product_details.php?&%{QUERY_STRING} [R=301,L] Code (markup):
I am not a programmer but i use the following code for 301 options +FollowSymlinks RewriteEngine on rewritecond %{http_host}^buy-now.php[nc] rewriterule ^(.*)$ buy.php 1[r=301,nc] try it........