[support] http/s issues (still)
sander-martijn
lists at severeddreams.com
Sat Oct 6 01:26:34 UTC 2007
Hi guys,
I'm still having an http to https and back issue with drupal, but I've
narrowed it down to a single L and wondering if anyone has any
suggestions now. The L stands for "Last Rule" - if it's there it
behaves half correctly and if it's not there it behaves half correctly -
in the opposite way.
# REWRITE TO SSL if contact/requestBook
# WORKS AS EXPECTED ON IT'S OWN
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(contact/requestBook)$ https://%{SERVER_NAME}/$1 [R=301,L]
# REWRITE TO NON-SSL if not contact/requestBook
# also ignore if a supporting file or else the page will display a
broken lock
# IF [R=301,L] then any other page on https redirects to non-ssl fine
but contact/requestBook redirects to non-ssl non-pretty url
# http://s24863.gridserver.com/index.php?q=contact/requestBook
# IF you remove the L so it's [R=301] then contact/requestBook
redirects fine but other pages stay on https and report Page not found
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !(contact/requestBook)
RewriteCond %{REQUEST_URI} !(.*css)
RewriteCond %{REQUEST_URI} !(.*js)
RewriteCond %{REQUEST_URI} !(.*jpg)
RewriteCond %{REQUEST_URI} !(.*gif)
RewriteCond %{REQUEST_URI} !(.*ico)
RewriteCond %{REQUEST_URI} !(.*png)
RewriteRule ^(.*)$ http://%{SERVER_NAME}/$1 [R=301]
# Alternate: RewriteRule ^(.*)$ http://%{SERVER_NAME}/$1 [R=301,L]
# DRUPAL REWRITE
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Thanks,
sander
More information about the support
mailing list