View Single Post
  #2 (permalink)  
Old 06-27-2007, 01:06 PM
wige's Avatar
wige wige is offline
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: Please tell me how to make 301 redirection of these links in this .htaccess file?

The rewrites as you have them are considered internal. As a result, no redirection is done - the user or the search engine still sees the original URL, but the server displays a different page. So just to give one example of a change to make it a 301 redirect

Original Version:
Code:
 RewriteRule ^downloads/(.*)$ search.php?keywords=$1
301 Redirect Version
Code:
 RewriteRule ^downloads/(.*)$ http://www.mysite.com/search.php?keywords=$1[R=301]
There is a second way, which is supposed to be more efficient in the server code
Code:
 RedirectMatch 302 ^downloads/(.*)$ http://www.mysite.com/search.php?keywords=$1
__________________
The best way to learn anything, is to question everything.
Reply With Quote