SEO: WordPress Search with Permalink structure

Julian Klewes, digital brand strategist, published this article 6 years ago

Written by Julian Klewes

27 y/o Digital Native with a cum laude degree in International Business, Management, Marketing and Controlling, with hands on experience in both Agency and Corporate worlds.

Interesting, tell me more about JK

no image, sorry

Ever wondered how you could transfer any searches from ?s=TERM to /search/TERM , then read below or visit Alex King’s approach.

This is too good to not report on, so for personal archiving reasons, I have put Alex’ Code below:


To your .htaccess file add:


RewriteRule ^search/(.+)?$ /index.php?s=$1 [QSA,L]

In your theme, look out for search.php or similar and change the form field to:


<form action=";/index.php" method="get" onsubmit="location.href='/search/' + encodeURIComponent(this.s.value).replace(/%20/g, '+'); return false;">

This is it, you are done!

  • http://www.ordifacil.com OrdiFacil’

    And would you know a way to change the