301 Redirect Empty WordPress Searches to Root


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. # Redirect Empty Searches to root
  2. RewriteCond %{QUERY_STRING} ^s=$
  3. RewriteRule ^ /? [L,R=301]

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.