![]() Topic awaiting preservation: Adding a secure section to your website (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: London |
![]() Hello, |
Paranoid (IV) Inmate From: Mercury City |
![]() quote:
|
Paranoid (IV) Inmate From: London |
![]() |
Paranoid (IV) Inmate From: Mercury City |
![]() 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: |
![]() 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 |
![]() |
Nervous Wreck (II) Inmate From: |
![]() Blaise : check the above link, it contains everything you need to know. |
Paranoid (IV) Inmate From: London |
![]() 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: |
![]() Okay, bear with me... |
Nervous Wreck (II) Inmate From: |
![]() ....In the 21st century, that "post too old" feature is a really terrible idea |
Paranoid (IV) Inmate From: London |
![]() 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: |
![]() 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. |