Closed Thread Icon

Topic awaiting preservation: htaccess (again) and sessions Pages that link to <a href="https://ozoneasylum.com/backlink?for=28206" title="Pages that link to Topic awaiting preservation: htaccess (again) and sessions" rel="nofollow" >Topic awaiting preservation: htaccess (again) and sessions\

 
Author Thread
justin
Nervous Wreck (II) Inmate

From: Stockholm, Sweden
Insane since: Jan 2006

posted posted 07-14-2006 12:12

Hi

I have two problems. First, my webserver seems to store the htaccess-settings. If I make a change and upload the changes wont take place. Also, if I remove the file from the server, it still redirects! I have mailed the host but they just shrug. Is it possible that the settings are store in a cache? I'm completely dumbfund.

Secondly, it's the sessions.
If a user tries to access the site or it's subdirs for the first time they're redirected to the index page
http://www.mysite.com/login

They login, and - for instance - click on forum
http://www.mysite.com/forum

So far so good. However, should the user (for som reason) type in the url without the www:
for example: http://mysite.com/forum
Then they are directed to the login page, again!
And this goes on and on.

I use this for the redirecting. Haven't written it myself but found it on the internet.

code:
RewriteCond %{HTTP_HOST} !^www\..* [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]



Any help is welcome.

/Justin

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 07-14-2006 13:01

No, the settings wouldn't be stored in a cache on the server side - as for your browser, or some kind of proxy inbetween, who knows?
Tried using a different browser? I bet your browser remembers the 'moved permanently' you're sending.

Sessions are stored in cookies, and those are should never be passed between domains. But then, you are redirecting...

Maybe you shouldn't be dropping the query string when redirecting... that would be worth a try, even if it's a wild guess. See the mod_rewrite documentation for details. Or try a different redirection code from 301

so long

->Tyberius Prime

« BackwardsOnwards »

Show Forum Drop Down Menu