Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - solve cookies for www. ???
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

solve cookies for www. ???

 Post Reply Post Reply
Author
miladanimator View Drop Down
Groupie
Groupie
Avatar

Joined: 24 July 2005
Location: United States
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote miladanimator Quote  Post ReplyReply Direct Link To This Post Topic: solve cookies for www. ???
    Posted: 27 February 2008 at 4:48pm
hello -borg-

I have a qusetion :

a user login on http://domainname.com, a cookie set and save the user informations to auto login for next user visit ...

but in the next visit, if the user go to http://www.domainname.com, the user must login a gain ...

and my question: is there a way to solve this for next release ???

I found here an article : http://www.asp101.com/articles/chris/transfercookies/default.asp
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2008 at 4:56pm
Getting cookies to set probally is a nightmare anyway, the hack you have found would just ciourse no end of support issues.

Cookies have always worked in the way you describe on all sites as www.domain.com is different to domain.com and so browsers will always see cookies as being set by 2 different sites.

I would recommend instead that you set domain.com to auto redirect to www.domain.com instead. This should also help Google rankings as they lower your page ranking if you have more than 1 domain pointing to the same content which www.domain.com and domain.com do.
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2008 at 6:46am
Bruce, you mean this cannot be done setting cookie domain?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2008 at 9:25am
It can be done, however it's not something that would be natively supported in the software.

The reason being is that cookies are one of the big problems with software that use them, by making the process even more complicated in this way would course no end of support issues and would not be recommended.
Back to Top
sparkweb View Drop Down
Newbie
Newbie


Joined: 09 February 2008
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote sparkweb Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2008 at 3:37am
This is what I did at the top of common.asp:
 
Quote
Dim strRedirectURLQuery
If request.servervariables("QUERY_STRING") <> "" Then strRedirectURLQuery = "?" & request.servervariables("QUERY_STRING")
If request.servervariables("HTTP_HOST") <> "www.mysite.com" Then response.redirect "http://www.mysite.com" & request.servervariables("path_info") & strRedirectURLQuery
Set strRedirectURLQuery = Nothing
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.