[support] Unable to keep logged in to some sites when behind a proxy

Francesco entuland at gmail.com
Wed May 20 14:18:21 UTC 2009


Hi all, here is an update about my issue, I've found the way to keep
logged in using the proxy connection - at least on my websites - hence
I consider the problem of this very thread almost solved - almost, as
I still cannot log in to drupal.org. Read on if you will.

----

Luckily I had not to hack anything at all, checking out the cookies
was way easier than I thought.

This is the code I inserted in a block:
<?php print_r($_COOKIE); ?>

And I got a confirmation: a session cookie gets set and used by my
Dupal installation even when I'm behind a proxy, only that the cookie
do not reside on my PC - hence, my proxy server must be storing it for
me.

Is that bad news? I don't know.

Anyway, playing around with urls I've come to discover that if I add
www to the path I can log in with no problems on the websites which
used to keep me out (when using the proxy connection). *That* is good
news, I can finally manage those sites without having to subscribe a
different connection.

(although I found the way to keep logged in to my sites, I still can't
log in into drupal.org. I suppose that if it were set to allow
www.drupal.org as base url instead of redirecting all requests to the
no-www paths, then I could keep logged in there even with my
uncomfortable proxy connection...)

But now I have another problem.
Here are the directives I'm using:

------------------

RewriteCond %{HTTP_HOST} ^toscana-offerte\.com$ [NC]
RewriteRule ^(.*)$ http://www.toscana-offerte.com/$1 [L,R=301]

RewriteBase /drupal

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

-----------------

And here is the problem.

While requesting these...

- http://www.toscana-offerte.com/drupal
- http://www.toscana-offerte.com/drupal/node/add/page

...works fine and keeps me logged in, if I request these...

- http://toscana-offerte.com/drupal
- http://toscana-offerte.com/drupal/node/add/page

...the server returns...

- http://www.toscana-offerte.com
- http://www.toscana-offerte.com/node/add/page

...and of course, the very last address above gives a 404 because
there is no Drupal installation at the root address.

Why is the string "\drupal" being stripped out by my .htaccess?
Shouldn't the rewritebase condition ensure that it doesn't get stripped?

Hope somebody could help here too - the most important problem is
solved now, but it would be nice to fix also this little incongruence.

Thanks a lot for your attention.
Cheers,
Francesco


More information about the support mailing list