When I submit a search page it ultimately results in an URL such as:
http://mysite.com/search/results/f08b67a2424d1196308191a24a6f8d86/
.. as I have set the result page to be /search/results.
However, if I have the following rewrite in effect (to always add ‘home’ to the URL if no location name is provided):
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^/(.*) <a href="http://www.mysite.com/home">http://www.mysite.com/home</a> [L].. the search result page gets disabled: when I submit the search I end up to the home URL. Looking at the rewrite logs Apache mod_rewrite is matching a blank URI, i.e. just ‘/’, and so it gets redirected to ‘/home’. Yet when I disable the above rule the search result page (at a similar URL I mentioned above) is displayed. Why is this and is there some way to get around this?
Moved to HowTo by Moderator
Thanks!