Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Created March 7, 2013 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuckreynolds/5108987 to your computer and use it in GitHub Desktop.
Save chuckreynolds/5108987 to your computer and use it in GitHub Desktop.
Redirect empty searches in WordPress back to root. Empty ?s= suck and WP doesn't handle them. You should.
# Redirect Empty Searches to root
RewriteCond %{QUERY_STRING} ^s=$
RewriteRule ^ /? [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment