Topic awaiting preservation: Adding a secure section to your website |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: London |
posted 01-13-2010 10:25
Hello, |
Paranoid (IV) Inmate From: Mercury City |
posted 01-13-2010 10:44
quote:
|
Paranoid (IV) Inmate From: London |
posted 01-13-2010 11:38 |
Paranoid (IV) Inmate From: Mercury City |
posted 01-13-2010 13:24
I've never heard of the possibility of specifying some indexing options in a Global.asa file personally. The answer I gave you was specifically for your indexing issue, and I don't think you can resolve it with a Global.asa file ? but I might be wrong. |
Nervous Wreck (II) Inmate From: |
posted 01-13-2010 14:13
I take it you are running an IIS server? In that case, .htaccess isa useless. Depending on versions, ISAPI filters might be needed (plain vanilla asp) or you'll have to configure roles in asp.net. |
Paranoid (IV) Inmate From: London |
posted 01-13-2010 14:15 |
Nervous Wreck (II) Inmate From: |
posted 01-13-2010 14:16
Blaise : check the above link, it contains everything you need to know. |
Paranoid (IV) Inmate From: London |
posted 01-13-2010 16:03
Unfortunately I don't have access to the WebServer to make these changes. code: <% IF NOT Application("session") = Session("access") OR Application("session") = "" THEN Response.Redirect("../index.html") END IF %>
|
Nervous Wreck (II) Inmate From: |
posted 01-14-2010 01:53
Okay, bear with me... |
Nervous Wreck (II) Inmate From: |
posted 01-14-2010 07:47
....In the 21st century, that "post too old" feature is a really terrible idea |
Paranoid (IV) Inmate From: London |
posted 01-14-2010 11:00
This is the code I ran with in the end. code: sub Session_OnStart Application("session")="" end sub
code: password = LCase(Request.Form("pword")) user = LCase(Request.Form("uname")) location = "" Session("access") = "" IF (user = "test" AND password = "testpass") Then Session("access") = "test_account" location = "test_account/index.asp" END IF Application("session") = Session("access") dim folder set folder = Server.CreateObject("Scripting.FielSystemObject") Response.Redirect("location")
code: Dim folder, client Set folder = Server.CreateObject("Scripting.FileSystemObject") client = folder.GetParentFolderName(Request.ServerVariables("SCRIPT_NAME")) client = Right(client,InStrRev(client, "/")) Session("access") = client IF NOT Application("session") = Session("access") OR Application("session") = "" THEN Response.Redirect("../index.html") END IF
|
Nervous Wreck (II) Inmate From: |
posted 01-14-2010 12:53
Yeah, it's safe. For memory/speed, you could skip the FSO (FileSystemObject) and tap into the built-in Server object, but you're good to go. |