473,575 Members | 3,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

URL capture and redirect

DGS
Hi guys,

Not a developer, but an admin so please pardon my ignorance.

I have an issue that I was hoping to get help with. What I need is for the
front page of my site to capture the URL that the user is requesting.
Regardless of where they go, they are prompted to login...but I want the
initial login page to capture where they have REQUESTED to go and store it
somewhere (I assume a cookie).

Then...later on in the process they will hit a redirect page which will read
that cookie value and send them to the originally requested page.

The reason for all of this is that the current redirection we are using
works fine, only it uses the "referrer" header and if the user is sent to a
"password change" or "incorrect password" screen then the referrer header
changes and becomes useless once the user goes to the latter redirect.html
page.

Any help is GREATLY appreciated.
May 17 '07 #1
4 7905
DGS said the following on 5/16/2007 8:25 PM:
Hi guys,

Not a developer, but an admin so please pardon my ignorance.

I have an issue that I was hoping to get help with. What I need is for the
front page of my site to capture the URL that the user is requesting.
How is the URL being requested? From links, buttons, or otherwise?
Regardless of where they go, they are prompted to login...but I want the
initial login page to capture where they have REQUESTED to go and store it
somewhere (I assume a cookie).
Then why not require the login *before* a page is requested? Make the
main page a login page. They login, they get a page of links. Then have
each page check to see if they logged in. If they didn't, then redirect
to the login page. The login page will have a hidden field containing
the URL that is in the referrer. Then everytime they submit the form it
keeps populating that hidden field until they successfully login. Then
the server reads that hidden field and redirects to the requested page.
No JS needed.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 17 '07 #2
DGS

"Randy Webb" <Hi************ @aol.comwrote in message
news:g_******** ************@gi ganews.com...
DGS said the following on 5/16/2007 8:25 PM:
>Hi guys,

Not a developer, but an admin so please pardon my ignorance.

I have an issue that I was hoping to get help with. What I need is for
the front page of my site to capture the URL that the user is requesting.

How is the URL being requested? From links, buttons, or otherwise?
The URL is most frequently accessed from various customer's intranet
pages...using links. However there are a variety of customers and methods
in which the URLS are requested.
>
>Regardless of where they go, they are prompted to login...but I want the
initial login page to capture where they have REQUESTED to go and store
it somewhere (I assume a cookie).

Then why not require the login *before* a page is requested? Make the main
page a login page. They login, they get a page of links. Then have each
page check to see if they logged in. If they didn't, then redirect to the
login page. The login page will have a hidden field containing the URL
that is in the referrer. Then everytime they submit the form it keeps
populating that hidden field until they successfully login. Then the
server reads that hidden field and redirects to the requested page. No JS
needed.
The product in use here is Tivoli's WebSEAL...which is a reverse proxy
webserver with security. Because of the wide variety of URLs the customer
is using creating a landing page with links would be impossible...th ere are
simply too many of them. Basically, WebSEAL looks at the URL requested and
if authentication is required, stores it away (encrypted in a session cookie
where I have no ability to cull out the data). If the user's authentication
is succesful they go to a "redirect.h tml" page local on the WebSEAL server
(I could go into why but that is a long story in and of itself...due to SSO
reasons). Everything works fine, but the "redirect.h tml" page uses the
referrer header which, if the user was forced to change their password due
to expiration, is no longer populated with the originally requested URL.
>
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/

May 17 '07 #3
DGS said the following on 5/16/2007 9:10 PM:
"Randy Webb" <Hi************ @aol.comwrote in message
news:g_******** ************@gi ganews.com...
>DGS said the following on 5/16/2007 8:25 PM:
>>Hi guys,

Not a developer, but an admin so please pardon my ignorance.

I have an issue that I was hoping to get help with. What I need is for
the front page of my site to capture the URL that the user is requesting.
How is the URL being requested? From links, buttons, or otherwise?

The URL is most frequently accessed from various customer's intranet
pages...using links. However there are a variety of customers and methods
in which the URLS are requested.
Add an onclick to all the links:

onclick="saveCo okie(this.href) "

And then save the href in a cookie.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 17 '07 #4
Randy Webb wrote on 17 mei 2007 in comp.lang.javas cript:
DGS said the following on 5/16/2007 9:10 PM:
>"Randy Webb" <Hi************ @aol.comwrote in message
news:g_******* *************@g iganews.com...
>>DGS said the following on 5/16/2007 8:25 PM:
Hi guys,

Not a developer, but an admin so please pardon my ignorance.

I have an issue that I was hoping to get help with. What I need is
for the front page of my site to capture the URL that the user is
requesting .
How is the URL being requested? From links, buttons, or otherwise?

The URL is most frequently accessed from various customer's intranet
pages...usin g links. However there are a variety of customers and
methods in which the URLS are requested.

Add an onclick to all the links:

onclick="saveCo okie(this.href) "

And then save the href in a cookie.
Good idea, Randy, but it would fail, if the user has multiple sessions in
different windows of the same browser type, as cookies do not natively
know about sessions.

I think we should advice the OP to use serverside sessions and scripting,
also while his stipulation of a login already hopefully implies having
serverside technology available.

asp jscript:

<script language='jscri pt' runat='server'>
if (session('logge din') != 'yes') {
session('urlToR eturnToAfterLog in') = request.Serverv ariables('URL') ;
response.Redire ct('login.asp') ;
}
</script>

Using an include for this makes life even easier.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 17 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5588
by: Mike - EMAIL IGNORED | last post by:
I have a VC++6.0 program than calls library functions that write to cerr. I would like to capture this output in the calling program. Would you please let me know how I could to this? If I should ask on another group, please let me know. Thanks in advance, Mike.
1
4317
by: Jim Quast | last post by:
I have an ASP page and a CREGReports002.vbs file coded to export data to excel. I do this by building variables in a stored procedure. The ASP page has text boxes, list boxes, and radio buttons. I also placed two buttons on the form. One submits the form to redirect to the Crystal Web Viewer (genCREGReports.ASP). The other one executes VB...
3
6928
by: Frank T. Clark | last post by:
How do I redirect or capture keydown events in a parent form from a child form? I have a main form which displays another informational form marked "SizableToolWindow". Form child = new ChildForm(); this.AddOwnedForm (child);
4
6222
by: Paul | last post by:
I have developed an ASP.NET web page with a VB.net for the code behind. I would like to redirect the output of the web page so I can send it as an Email. Or Redirect the HTTPResponse stream on the server to a file. Any ideas would be appreciated. Thank you Paul
9
7848
by: Hugh Janus | last post by:
Hi all, Does anybody know if it is possible with VB.NET to capture and redirect traffic that flows through a particular port? i.e. the app either listens or watches port 1234 for outgoing traffic. It then captures or copies all the traffic and simalteanously send it out of port 4321. Another possible example: telnet sends info out on...
3
5750
by: Nuevo | last post by:
I am looking for some method to capture, into a variable, the entire URL of an http request and redirect to SSL. For example, if a user opens a browser and typed in http://myserver.com/application/some.asp?form=y&format=mgs&customerid=893bdgt0248991 I want to be able to redirect to an SSL connection ...
1
2307
by: Jeck621 | last post by:
I like to create a custom code to make custom redirect. For example, I like this URL to be the redirect URL http://testme.now/test to be redirected to http://nowtesting.com. Actuall the /test folder should not exists in the IIS because I want a custom redirect right. I write a custom HttpModule to capture the HttpRequest but during debug it...
4
8726
by: Akhenaten | last post by:
What's the most effective way to capture a URL to pass as a variable? I have a login function I want to modify to redirect the user back to the page they logged in from. I know how to do the redirect, just uncertain of capturing the URL. TIA ../JLK
5
7164
by: Muffin | last post by:
I am trying to capture the out put of a command line program. Let say ping or maybe better yet nslookup. I would like to launch and then capture all the output , redirect it I guess to a string variable or something. I know how to start it , but not how to capture it. Nslookup I realize can be started interactively, which is to some degree...
0
8120
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6515
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5338
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3778
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3797
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2286
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1382
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.