Need Some rerouting code... puhleasse

Discussion in 'ASP General' started by Drifter, Nov 19, 2003.

  1. Drifter

    Drifter Guest

    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
     
    Drifter, Nov 19, 2003
    #1
    1. Advertising

  2. Drifter

    Drifter Guest

    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:bpeuht$263$...
    > 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
    >
    >
     
    Drifter, Nov 19, 2003
    #2
    1. Advertising

  3. Drifter

    Ray at Guest

    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:bpfvb0$a0c$...
    > 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
     
    Ray at, Nov 19, 2003
    #3
  4. Drifter

    Drifter Guest

    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" <> wrote in message
    news:...
    > "Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
    > news:bpeuht$263$...
    > > 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
    >
    >
     
    Drifter, Nov 19, 2003
    #4
  5. Drifter

    Aaron Guest

    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" <> wrote in message
    > news:...
    >
    >>"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
    >>news:bpeuht$263$...
    >>
    >>>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
    >>
    >>

    >
    >
    >
     
    Aaron, Nov 19, 2003
    #5
  6. Drifter

    Drifter Guest

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

    D


    "Aaron" <> wrote in message
    news:%2308em%...
    > 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" <> wrote in message
    > > news:...
    > >
    > >>"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
    > >>news:bpeuht$263$...
    > >>
    > >>>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
    > >>
    > >>

    > >
    > >
    > >

    >
     
    Drifter, Nov 19, 2003
    #6
  7. Drifter

    Guest Guest

    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 an
    >e-commerce solution - very generic.
    >
    >D
    >
    >
    >"Aaron" <> wrote in message
    >news:%2308em%...
    >> 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" <> wrote in

    message
    >> > news:...
    >> >
    >> >>"Drifter" <loreseeker_prime@hotmail*removethis*.com>

    wrote in message
    >> >>news:bpeuht$263$...
    >> >>
    >> >>>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
    >> >>
    >> >>
    >> >
    >> >
    >> >

    >>

    >
    >
    >.
    >
     
    Guest, Nov 19, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    691
    Guest
    Feb 25, 2004
  2. Andrew Connell
    Replies:
    1
    Views:
    553
    Natty Gur
    Oct 21, 2003
  3. Codex Twin
    Replies:
    8
    Views:
    499
    Codex Twin
    Dec 3, 2004
  4. Holmes!
    Replies:
    2
    Views:
    448
    Malcolm Dew-Jones
    Apr 2, 2005
  5. Florian Gross
    Replies:
    8
    Views:
    139
    Yukihiro Matsumoto
    Aug 18, 2003
Loading...

Share This Page