0

Please I have tried my best but to no avail, I want to limit search to specific category, but its not working.

before now I customize my search permalink from example.com/?s=keyword to example.com/search/keyword/ and redirected all the search permalink structure from /?s= to /search/

I am tring to limit search to specific category but I am being redirected to 404 error page when i try example.com/categoryname/search/keyword/

But if I try example.com/categoryname/?s=keyword it works very fine, Please Is there any way to achieve this Please help me out.

Thanks in advance.

Below is my htaccess code which i used to redirect my search from /?= to /search/

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.