This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Use custom URL for default search results page

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Use custom URL for default search results page Reply To: Use custom URL for default search results page

#40083
Ernest MarcinkoErnest Marcinko
Keymaster

If the results override actually works on the default results page, then there is still hope.

See if the .htaccess redirection works correctly, it should tunnel all of the query arguments to the orinal page. My only guess is, that maybe some of the arguments are stripped off via the .htaccess rule, so it does not trigger the override. If you are using this rule from the article:

# Change WordPress search URL
RewriteCond %{QUERY_STRING} \\?s=([^&]+) [NC]
RewriteRule ^$ /search/%1/? [NC,R,L]

..the second line is very suspicious to me. The regular expression says, that ‘get every character after the “?s=” string, which is not the & character’ – and that basically removes any other parameter after the phrase (if I am not mistaken).

Can you please try this variation instead:

# Change WordPress search URL
RewriteCond %{QUERY_STRING} \\?s=([*]+) [NC]
RewriteRule ^$ /search/%1/? [NC,R,L]

..or maybe even this:

# Change WordPress search URL
RewriteCond %{QUERY_STRING} \\?s=(*) [NC]
RewriteRule ^$ /search/%1/? [NC,R,L]