Topic: htaccess (again) and sessions (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=28206" title="Pages that link to Topic: htaccess (again) and sessions (Page 1 of 1)" rel="nofollow" >Topic: htaccess (again) and sessions <span class="small">(Page 1 of 1)</span>\

 
justin
Nervous Wreck (II) Inmate

From: Stockholm, Sweden
Insane since: Jan 2006

IP logged posted posted 07-14-2006 12:12 Edit Quote

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

IP logged posted posted 07-14-2006 13:01 Edit Quote

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



Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu