Print Page | Close Window

a serious problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21819
Printed Date: 29 March 2026 at 10:25am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: a serious problem
Posted By: pro_touch
Subject: a serious problem
Date Posted: 03 November 2006 at 6:01am

actually this is not typical forum support question thats why i am posting here i need general ASP coding.

my problem is that my forum users are failing to login when they come to my site with http://www.sitename.com - www.sitename.com but without www they can login easily.
 
i have been told that this is the problem with hosting and bla bla
 
now if you have another idea then give me otherwise just give me the code for this situation mentioned below. or just translate it into ASP i am writing the query in english.
 
 
If the address in the address bar contains www then
forward the user to the site without www
end if.
 
now one more thing what if someone comes from search engine to a specific page ? like www.mysite.com/ blablapage.asp
 
i hope you understood the situation and will help me soon. Thank you.
 
 



Replies:
Posted By: zMaestro
Date Posted: 12 November 2006 at 12:50am
you can say something like:
 

IF Left(Request.ServerVariables("HTTP_HOST"), 3) = "www" Then Response.Redirect "http://sitename.com"
 


Posted By: Scott07
Date Posted: 30 November 2006 at 10:57am
How are the cookies being sent back in the HTTP headder?  Do they have a domain reffering them to send back to the sitename without the www prefix?

-------------
http://www.worldsofwar.co.uk - Worlds of War II



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