By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,456 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

Need Some rerouting code... puhleasse

P: n/a
I have just picked up a little hobble to fix some code for an e-commerce
site (older). It uses Aliant as the Secure Transaction server (if familiar
with it you will just shiver). Problem is the secure server picks up the URL
where you came from, in my case this is a product screen - a single
product - not the list of products. Aliant's code reads this URL, and if you
<continue shopping> you end up back on the single product page, as this is
where you left. This is confusing to a customer. if they click <back> from
here - they end up on the purchase shopping cart screen again, and it
increases the order as all info was passed once more. It basically forms a
confusing loop.

Aliant refuses to adjust thrir code for individual clients as it is a global
screen that you get tossed to for transactions, all their e-com clients end
up there. So - what I want to do is this: Write some code so that when i
click continue shopping, it goes back to the Single item Purchase page (as
it must the way Aliant has it coded). It will only stay here a sec - because
i want to re-route it to the list page, by writing an "If lastURL was Aliant
Checkout screen, then re-route to list screen" type of code piece - can this
be done?

Thanks in advance -

D
Jul 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Hmm no answers... how about if i try and simplify it. If I want to re-route
to another page only if the user came from a very specific previous URL, how
could I do it?

D

"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
I have just picked up a little hobble to fix some code for an e-commerce
site (older). It uses Aliant as the Secure Transaction server (if familiar
with it you will just shiver). Problem is the secure server picks up the URL where you came from, in my case this is a product screen - a single
product - not the list of products. Aliant's code reads this URL, and if you <continue shopping> you end up back on the single product page, as this is
where you left. This is confusing to a customer. if they click <back> from
here - they end up on the purchase shopping cart screen again, and it
increases the order as all info was passed once more. It basically forms a
confusing loop.

Aliant refuses to adjust thrir code for individual clients as it is a global screen that you get tossed to for transactions, all their e-com clients end up there. So - what I want to do is this: Write some code so that when i
click continue shopping, it goes back to the Single item Purchase page (as
it must the way Aliant has it coded). It will only stay here a sec - because i want to re-route it to the list page, by writing an "If lastURL was Aliant Checkout screen, then re-route to list screen" type of code piece - can this be done?

Thanks in advance -

D

Jul 19 '05 #2

P: n/a
I'm in the process of doing something similar. Here are the ideas I worked
through.

/path/page.htm is now /path/page.asp
Option 1: Map .htm extension to asp.dll.
I decided against this, as it could cause confusion and also introduce
unnecessary processing on the server.

Option 2: Create a small table in a database with known urls that have
changed and their new paths.
I decided to use this. I will either automatically redirect people to the
new URL, or I will display a page that says something like, "This page has
changed to <new url>. Please update your bookmarks."

Option 3: Create a custom 404 that says, "Oops. This page is old. Try
using the links to find the new location, or maybe the page no longer
exists."
I'm using options 2 and 3 (with better wording than that...) as of now. For
option 3, I will probably add something that will detect the section of the
site that the person is in, i.e. site.com/employee, and have the 404 say
something like, "Go back to the main employee page <a href=/employee>.

I also setup the 404 to e-mail me the 404'ed urls, so that I can track down
more popular ones and add them to option 2. As far as option 2, I will
probably only use that for a month or so, and then bypass all of that. I
figure a month is enough time for people to update their things.

Ray at work

"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
Hmm no answers... how about if i try and simplify it. If I want to re-route to another page only if the user came from a very specific previous URL, how could I do it?

D

Jul 19 '05 #3

P: n/a
"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
So - what I want to do is this: Write some code so that when i
click continue shopping, it goes back to the Single item Purchase page (as
it must the way Aliant has it coded). It will only stay here a sec - because i want to re-route it to the list page, by writing an "If lastURL was Aliant Checkout screen, then re-route to list screen" type of code piece - can this be done?


Couldn't you add some ASP to the top of your Single item Purchase page that
checks to see if the Request.ServerVariables("HTTP_REFERER") matched the
checkout page, and if so, Response.Redirect to the desired page? In other
words, the user would never be shown the Single Item Purchase page because
they would transition before anything was displayed on the screen.

Regards,
Peter Foti
Jul 19 '05 #4

P: n/a
Excellent answer - and one that I have pursued for the last 2 hours - trying
to figure out how it worked. I built a test page with HTTP_REFERER in it
looking for the last page. I then went to other pages and checked the value,
nothing. I then read a little tip that referer only works if you reference
it from a link. I built another quick page with a link to HTTP_REFERER check
page, and all was good. To do final test I made a copy of the order
confirmation page from Aliant. They use this to create the link back to the
site:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://testsite/supertest.asp');">

When i use this code, the HTTP_REFERER does not catch the URL any more.
Arrrggghhh!!! I cannot make Aliant change the code, and as it is, it will
not be caught with HTTP_REFERER. Very annoying.

Any other ideas???

Thanks,

D
"Peter Foti" <pe****@systolicnetworks.com> wrote in message
news:vr************@corp.supernews.com...
"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
So - what I want to do is this: Write some code so that when i
click continue shopping, it goes back to the Single item Purchase page (as it must the way Aliant has it coded). It will only stay here a sec - because
i want to re-route it to the list page, by writing an "If lastURL was

Aliant
Checkout screen, then re-route to list screen" type of code piece - can

this
be done?


Couldn't you add some ASP to the top of your Single item Purchase page

that checks to see if the Request.ServerVariables("HTTP_REFERER") matched the
checkout page, and if so, Response.Redirect to the desired page? In other
words, the user would never be shown the Single Item Purchase page because
they would transition before anything was displayed on the screen.

Regards,
Peter Foti

Jul 19 '05 #5

P: n/a
Use a link instead of a form button

Drifter wrote:
Excellent answer - and one that I have pursued for the last 2 hours - trying
to figure out how it worked. I built a test page with HTTP_REFERER in it
looking for the last page. I then went to other pages and checked the value,
nothing. I then read a little tip that referer only works if you reference
it from a link. I built another quick page with a link to HTTP_REFERER check
page, and all was good. To do final test I made a copy of the order
confirmation page from Aliant. They use this to create the link back to the
site:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://testsite/supertest.asp');">

When i use this code, the HTTP_REFERER does not catch the URL any more.
Arrrggghhh!!! I cannot make Aliant change the code, and as it is, it will
not be caught with HTTP_REFERER. Very annoying.

Any other ideas???

Thanks,

D
"Peter Foti" <pe****@systolicnetworks.com> wrote in message
news:vr************@corp.supernews.com...
"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
So - what I want to do is this: Write some code so that when i
click continue shopping, it goes back to the Single item Purchase page
(as
it must the way Aliant has it coded). It will only stay here a sec -


because
i want to re-route it to the list page, by writing an "If lastURL was


Aliant
Checkout screen, then re-route to list screen" type of code piece - can


this
be done?


Couldn't you add some ASP to the top of your Single item Purchase page


that
checks to see if the Request.ServerVariables("HTTP_REFERER") matched the
checkout page, and if so, Response.Redirect to the desired page? In other
words, the user would never be shown the Single Item Purchase page because
they would transition before anything was displayed on the screen.

Regards,
Peter Foti



Jul 19 '05 #6

P: n/a
"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
Excellent answer - and one that I have pursued for the last 2 hours - trying to figure out how it worked. I built a test page with HTTP_REFERER in it
looking for the last page. I then went to other pages and checked the value, nothing. I then read a little tip that referer only works if you reference
it from a link. I built another quick page with a link to HTTP_REFERER check page, and all was good. To do final test I made a copy of the order
confirmation page from Aliant. They use this to create the link back to the site:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://testsite/supertest.asp');">

When i use this code, the HTTP_REFERER does not catch the URL any more.
Arrrggghhh!!! I cannot make Aliant change the code, and as it is, it will
not be caught with HTTP_REFERER. Very annoying.

Any other ideas???


Hmm... maybe some client side scripting could look at the history to
determine where the last page was (of course, that would only work for those
who have Javascript enabled), and then you could have Javascript redirect to
the new page?

Pete
Jul 19 '05 #7

P: n/a
Can't - the form code is a generated ASP code not on my server - it is an
e-commerce solution - very generic.

D
"Aaron" <a@1.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Use a link instead of a form button

Drifter wrote:
Excellent answer - and one that I have pursued for the last 2 hours - trying to figure out how it worked. I built a test page with HTTP_REFERER in it
looking for the last page. I then went to other pages and checked the value, nothing. I then read a little tip that referer only works if you reference it from a link. I built another quick page with a link to HTTP_REFERER check page, and all was good. To do final test I made a copy of the order
confirmation page from Aliant. They use this to create the link back to the site:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://testsite/supertest.asp');">

When i use this code, the HTTP_REFERER does not catch the URL any more.
Arrrggghhh!!! I cannot make Aliant change the code, and as it is, it will not be caught with HTTP_REFERER. Very annoying.

Any other ideas???

Thanks,

D
"Peter Foti" <pe****@systolicnetworks.com> wrote in message
news:vr************@corp.supernews.com...
"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...

So - what I want to do is this: Write some code so that when i
click continue shopping, it goes back to the Single item Purchase page


(as
it must the way Aliant has it coded). It will only stay here a sec -

because

i want to re-route it to the list page, by writing an "If lastURL was

Aliant

Checkout screen, then re-route to list screen" type of code piece - can

this

be done?

Couldn't you add some ASP to the top of your Single item Purchase page


that
checks to see if the Request.ServerVariables("HTTP_REFERER") matched the
checkout page, and if so, Response.Redirect to the desired page? In otherwords, the user would never be shown the Single Item Purchase page becausethey would transition before anything was displayed on the screen.

Regards,
Peter Foti


Jul 19 '05 #8

P: n/a
Control it from your side:

Hidden input tags that indicate "previous page" on the
list and single product page (and any place else they
might come from within your control). If the "previous
page" field doesn't exist, then the user just came from
somewhere else, so force them back to list page or where
ever.
-----Original Message-----
Can't - the form code is a generated ASP code not on my server - it is ane-commerce solution - very generic.

D
"Aaron" <a@1.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl. ..
Use a link instead of a form button

Drifter wrote:
> Excellent answer - and one that I have pursued for the last 2 hours -
trying
> to figure out how it worked. I built a test page with
HTTP_REFERER in it > looking for the last page. I then went to other pages and checked the
value, > nothing. I then read a little tip that referer only
works if you
reference > it from a link. I built another quick page with a
link to HTTP_REFERER
check > page, and all was good. To do final test I made a
copy of the order > confirmation page from Aliant. They use this to create the link back to
the > site:
>
> <input type="button" name="Continue" value="Continue
Shopping" > onclick="ContinueShopping ('http://testsite/supertest.asp');"> >
> When i use this code, the HTTP_REFERER does not catch the URL any more. > Arrrggghhh!!! I cannot make Aliant change the code, and as it is, it
will > not be caught with HTTP_REFERER. Very annoying.
>
> Any other ideas???
>
>
>
> Thanks,
>
>
>
> D
>
>
> "Peter Foti" <pe****@systolicnetworks.com> wrote in
message > news:vr************@corp.supernews.com...
>
>>"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message >>news:bp**********@nntp-stjh-01-01.rogers.nf.net...
>>
>>>So - what I want to do is this: Write some code so that when i >>>click continue shopping, it goes back to the Single item Purchase page >
> (as
>
>>>it must the way Aliant has it coded). It will only stay here a sec - >>
>>because
>>
>>>i want to re-route it to the list page, by writing an "If lastURL was >>
>>Aliant
>>
>>>Checkout screen, then re-route to list screen" type of code piece - can >>
>>this
>>
>>>be done?
>>
>>Couldn't you add some ASP to the top of your Single item Purchase page >
> that
>
>>checks to see if the Request.ServerVariables ("HTTP_REFERER") matched the >>checkout page, and if so, Response.Redirect to the desired page? In
other >>words, the user would never be shown the Single Item
Purchase page
because >>they would transition before anything was displayed

on the screen. >>
>>Regards,
>>Peter Foti
>>
>>
>
>
>

.

Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.