I'm running Drupal 7, Apache Solr module 1.2, Boost 1.3
When performing a search as an anonymous user, I (most of the time) just get redirected to the front page. I suspect some conflict with the boost module as this only happens for anonymous users and removing the .htaccess rules for boost seems to fix the problem. Although the eratic behaviour is quite confusing.
I notice that the form submit action for the search is always "/"
In the access logs, I see that the normal flow is:
- POST on "/"
- 302 Redirect on node/search/...
When having the problem as anonymous user, the flow is:
- POST on "/"
- 200 Status code and the boost cached index page is returned. No 302
Here are my boost .htaccess directives:
# Allow for alt paths to be set via htaccess rules; allows for cached variants (future mobile support)
RewriteRule .* - [E=boostpath:normal]
# Caching for anonymous users
# Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add|comment/reply))|(/(edit|user|user/(login|password|register))$) [OR]
RewriteCond %{HTTPS} on [OR]
RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [S=4]
##Added as the front page was displaying the content of index.php instead of cached html
RewriteCond %{REQUEST_URI} ^\/index.php$
RewriteCond cache/normal/drupaltestsite.com/_\.html -s
RewriteRule .* cache/normal/drupaltestsite.com/_\.html [L,T=text/html]
# GZIP
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=1]
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html,E=no-gzip:1]
# NORMAL
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
As the action is a POST, none of these directives should be executed I think, so I am not sure where the problem is.
Where is the 302 redirect made to forward the request on search/node... ?
Any help appreciated.
Jerome