Skip to content

Instantly share code, notes, and snippets.

@stinoga
Created May 18, 2012 03:16
Show Gist options
  • Save stinoga/2722936 to your computer and use it in GitHub Desktop.
Save stinoga/2722936 to your computer and use it in GitHub Desktop.
Wordpress SEO friendly search rewrite rule
# search redirect
# this will take anything in the query string, minus any extraneous values, and turn them into a clean working url
RewriteCond %{QUERY_STRING} \\?s=([^&]+) [NC]
RewriteRule ^$ /search/%1/? [NC,R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment