Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
There are 0 guests and 1 members in the forums right now.
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
davidlieb
Joined: Nov 03, 2001
# Posts: 17
|
Posted: 2001-Dec-06 07:28
Hello!Does anyone know a script that will set a cookie and re-route visitors if they've been there before? I'm trying to build a Flash site intro, but don't want to make people use it more than once! Thanks!
|
 |
aibob
Joined: Dec 14, 2001
# Posts: 30
|
Posted: 2001-Dec-14 14:43
I can't provide you with a "script" because most people refer to CGI scripts. I use ASP (Active Server Pages) to write websites.Let me tell you how I do this. I have a web host that hosts multiple domains but all point to the same place. So my default.asp pages gets the value in the server variable SERVER_NAME and parses the domain out. It is then a bunch of if then statements that says if it's this domain redirect it to his directory/default.asp. But for one site if they are logged in I don't want to send them to directory/deafult.asp but directory/member_default.asp. Here is a snippet of my asp code. I've replaced my domain with an x.com so the admins won't change it. <%@Language=VBScript%> <% Option Explicit %> <% Dim sServerName, iLoc, iCookieZipCode, sDomain, sSubDomain sServerName = LCase(Trim(Request.ServerVariables("SERVER_NAME"))) If ( sServerName = "www.x.com" Or sServerName = "x.com" ) Then ' If they are a user with a user id then send them to the member default page If IsNumeric(Request.Cookies("Session")("LUserID")) = True And Request.Cookies("Session")("LUserID") > 0 Then Response.Redirect("http://www.x.com/bb/Member_Default.asp") Else Response.Redirect("http://www.x.com/bb/default.asp") End If End If %>
|
 |
Sinoed
Joined: Dec 11, 2000
# Posts: 5266
|
Posted: 2001-Dec-23 04:01
Use this very carefully. I went to movie reviews site (something like AMC or famout players - I can't remember) just a few days ago which automatically forwarded me to the "Canadian" version - which happened to not load at all. Any time I tried to access the site this happened and I finally gave up and skipped it entirely. I ended up seeing a movie at another theatre because I couldn't get the information that I wanted. If you're going to do this at the very least provide links to switch back to the page(s) of your visitors choice.
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|