Posted By

baires on 12/22/10


Tagged

redirect search wordpress


Versions (?)

301 Redirect Empty WordPress Searches to Root


 / Published in: PHP
 

URL: http://forrst.com/posts/301_Redirect_Empty_WordPress_Searches_to_Root-05C

A blank search in wordpress returns all the posts, which could be taken as duplicate content if that got indexed.

  1. # Redirect Empty Searches to root
  2. RewriteCond %{QUERY_STRING} ^s=$
  3. RewriteRule ^ /? [L,R=301]

Report this snippet  

You need to login to post a comment.