301 redirect homepage is messing up search queries
-
We are using a 301 redirect for our home page in order to preserve pretty permalinks (flaw in theme won’t allow pretty permalinks unless blog as main page is selected, which we don’t want) We are redirecting out root url to root/home/.
We are using this:
RewriteEngine on
RewriteRule ^$ OURSITE/home/ [R=301,L]It works well in all cases except the search query. When searching instead of looking here:
OURSITE/?s=search-term
it’s looking here:
OURSITE/home/?s=search-term
is there a way to exclude search queries or rewrite the redirect to only apply to the home page and not queries?
I’m open to better ideas to handle the home page problem as well!
- The topic ‘301 redirect homepage is messing up search queries’ is closed to new replies.