Print Page | Close Window

solve cookies for www. ???

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=25354
Printed Date: 03 April 2026 at 9:43pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: solve cookies for www. ???
Posted By: miladanimator
Subject: solve cookies for www. ???
Date 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 - http://www.asp101.com/articles/chris/transfercookies/default.asp



Replies:
Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: StarDust
Date Posted: 28 February 2008 at 6:46am
Bruce, you mean this cannot be done setting cookie domain?

-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x


Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: sparkweb
Date 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") <> " http://www.mysite.com - www.mysite.com " Then response.redirect " http://www.mysite.com - http://www.mysite.com " & request.servervariables("path_info") & strRedirectURLQuery
Set strRedirectURLQuery = Nothing



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net