Posted By

baires on 12/22/10


redirect search wordpress

Versions (?)

301 Redirect Empty WordPress Searches to Root

 / Published in: PHP


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.