Need Some rerouting code... puhleasse

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Drifter

    Need Some rerouting code... puhleasse

    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

    #2
    Re: Need Some rerouting code... puhleasse

    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_pri me@hotmail*remo vethis*.com> wrote in message
    news:bpeuht$263 $1@nntp-stjh-01-01.rogers.nf.ne t...[color=blue]
    > 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[/color]
    URL[color=blue]
    > 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[/color]
    you[color=blue]
    > <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[/color]
    global[color=blue]
    > screen that you get tossed to for transactions, all their e-com clients[/color]
    end[color=blue]
    > 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 -[/color]
    because[color=blue]
    > i want to re-route it to the list page, by writing an "If lastURL was[/color]
    Aliant[color=blue]
    > Checkout screen, then re-route to list screen" type of code piece - can[/color]
    this[color=blue]
    > be done?
    >
    > Thanks in advance -
    >
    > D
    >
    >[/color]


    Comment

    • Ray at

      #3
      Re: Need Some rerouting code... puhleasse

      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_pri me@hotmail*remo vethis*.com> wrote in message
      news:bpfvb0$a0c $1@nntp-stjh-01-01.rogers.nf.ne t...[color=blue]
      > Hmm no answers... how about if i try and simplify it. If I want to[/color]
      re-route[color=blue]
      > to another page only if the user came from a very specific previous URL,[/color]
      how[color=blue]
      > could I do it?
      >
      > D[/color]


      Comment

      • Peter Foti

        #4
        Re: Need Some rerouting code... puhleasse

        "Drifter" <loreseeker_pri me@hotmail*remo vethis*.com> wrote in message
        news:bpeuht$263 $1@nntp-stjh-01-01.rogers.nf.ne t...[color=blue]
        > 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 -[/color]
        because[color=blue]
        > i want to re-route it to the list page, by writing an "If lastURL was[/color]
        Aliant[color=blue]
        > Checkout screen, then re-route to list screen" type of code piece - can[/color]
        this[color=blue]
        > be done?[/color]

        Couldn't you add some ASP to the top of your Single item Purchase page that
        checks to see if the Request.ServerV ariables("HTTP_ REFERER") matched the
        checkout page, and if so, Response.Redire ct 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


        Comment

        • Drifter

          #5
          Re: Need Some rerouting code... puhleasse

          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="Contin ueShopping('htt p://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" <peterf@systoli cnetworks.com> wrote in message
          news:vrn3i9g5d8 ji9a@corp.super news.com...[color=blue]
          > "Drifter" <loreseeker_pri me@hotmail*remo vethis*.com> wrote in message
          > news:bpeuht$263 $1@nntp-stjh-01-01.rogers.nf.ne t...[color=green]
          > > 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[/color][/color]
          (as[color=blue][color=green]
          > > it must the way Aliant has it coded). It will only stay here a sec -[/color]
          > because[color=green]
          > > i want to re-route it to the list page, by writing an "If lastURL was[/color]
          > Aliant[color=green]
          > > Checkout screen, then re-route to list screen" type of code piece - can[/color]
          > this[color=green]
          > > be done?[/color]
          >
          > Couldn't you add some ASP to the top of your Single item Purchase page[/color]
          that[color=blue]
          > checks to see if the Request.ServerV ariables("HTTP_ REFERER") matched the
          > checkout page, and if so, Response.Redire ct 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
          >
          >[/color]


          Comment

          • Aaron

            #6
            Re: Need Some rerouting code... puhleasse

            Use a link instead of a form button

            Drifter wrote:
            [color=blue]
            > 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="Contin ueShopping('htt p://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" <peterf@systoli cnetworks.com> wrote in message
            > news:vrn3i9g5d8 ji9a@corp.super news.com...
            >[color=green]
            >>"Drifter" <loreseeker_pri me@hotmail*remo vethis*.com> wrote in message
            >>news:bpeuht$2 63$1@nntp-stjh-01-01.rogers.nf.ne t...
            >>[color=darkred]
            >>>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[/color][/color]
            >
            > (as
            >[color=green][color=darkred]
            >>>it must the way Aliant has it coded). It will only stay here a sec -[/color]
            >>
            >>because
            >>[color=darkred]
            >>>i want to re-route it to the list page, by writing an "If lastURL was[/color]
            >>
            >>Aliant
            >>[color=darkred]
            >>>Checkout screen, then re-route to list screen" type of code piece - can[/color]
            >>
            >>this
            >>[color=darkred]
            >>>be done?[/color]
            >>
            >>Couldn't you add some ASP to the top of your Single item Purchase page[/color]
            >
            > that
            >[color=green]
            >>checks to see if the Request.ServerV ariables("HTTP_ REFERER") matched the
            >>checkout page, and if so, Response.Redire ct 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
            >>
            >>[/color]
            >
            >
            >[/color]

            Comment

            • Peter Foti

              #7
              Re: Need Some rerouting code... puhleasse

              "Drifter" <loreseeker_pri me@hotmail*remo vethis*.com> wrote in message
              news:bpgl4m$i2h $1@nntp-stjh-01-01.rogers.nf.ne t...[color=blue]
              > Excellent answer - and one that I have pursued for the last 2 hours -[/color]
              trying[color=blue]
              > 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[/color]
              value,[color=blue]
              > 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[/color]
              check[color=blue]
              > 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[/color]
              the[color=blue]
              > site:
              >
              > <input type="button" name="Continue" value="Continue Shopping"
              > onclick="Contin ueShopping('htt p://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???[/color]

              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


              Comment

              • Drifter

                #8
                Re: Need Some rerouting code... puhleasse

                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:%2308em%23 trDHA.3536@tk2m sftngp13.phx.gb l...[color=blue]
                > Use a link instead of a form button
                >
                > Drifter wrote:
                >[color=green]
                > > Excellent answer - and one that I have pursued for the last 2 hours -[/color][/color]
                trying[color=blue][color=green]
                > > 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[/color][/color]
                value,[color=blue][color=green]
                > > nothing. I then read a little tip that referer only works if you[/color][/color]
                reference[color=blue][color=green]
                > > it from a link. I built another quick page with a link to HTTP_REFERER[/color][/color]
                check[color=blue][color=green]
                > > 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[/color][/color]
                the[color=blue][color=green]
                > > site:
                > >
                > > <input type="button" name="Continue" value="Continue Shopping"
                > > onclick="Contin ueShopping('htt p://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[/color][/color]
                will[color=blue][color=green]
                > > not be caught with HTTP_REFERER. Very annoying.
                > >
                > > Any other ideas???
                > >
                > >
                > >
                > > Thanks,
                > >
                > >
                > >
                > > D
                > >
                > >
                > > "Peter Foti" <peterf@systoli cnetworks.com> wrote in message
                > > news:vrn3i9g5d8 ji9a@corp.super news.com...
                > >[color=darkred]
                > >>"Drifter" <loreseeker_pri me@hotmail*remo vethis*.com> wrote in message
                > >>news:bpeuht$2 63$1@nntp-stjh-01-01.rogers.nf.ne t...
                > >>
                > >>>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[/color]
                > >
                > > (as
                > >[color=darkred]
                > >>>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[/color]
                > >
                > > that
                > >[color=darkred]
                > >>checks to see if the Request.ServerV ariables("HTTP_ REFERER") matched the
                > >>checkout page, and if so, Response.Redire ct to the desired page? In[/color][/color][/color]
                other[color=blue][color=green][color=darkred]
                > >>words, the user would never be shown the Single Item Purchase page[/color][/color][/color]
                because[color=blue][color=green][color=darkred]
                > >>they would transition before anything was displayed on the screen.
                > >>
                > >>Regards,
                > >>Peter Foti
                > >>
                > >>[/color]
                > >
                > >
                > >[/color]
                >[/color]


                Comment

                • Guest's Avatar

                  #9
                  Re: Need Some rerouting code... puhleasse

                  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.


                  [color=blue]
                  >-----Original Message-----
                  >Can't - the form code is a generated ASP code not on my[/color]
                  server - it is an[color=blue]
                  >e-commerce solution - very generic.
                  >
                  >D
                  >
                  >
                  >"Aaron" <a@1.net> wrote in message
                  >news:%2308em%2 3trDHA.3536@tk2 msftngp13.phx.g bl...[color=green]
                  >> Use a link instead of a form button
                  >>
                  >> Drifter wrote:
                  >>[color=darkred]
                  >> > Excellent answer - and one that I have pursued for[/color][/color][/color]
                  the last 2 hours -[color=blue]
                  >trying[color=green][color=darkred]
                  >> > to figure out how it worked. I built a test page with[/color][/color][/color]
                  HTTP_REFERER in it[color=blue][color=green][color=darkred]
                  >> > looking for the last page. I then went to other pages[/color][/color][/color]
                  and checked the[color=blue]
                  >value,[color=green][color=darkred]
                  >> > nothing. I then read a little tip that referer only[/color][/color][/color]
                  works if you[color=blue]
                  >reference[color=green][color=darkred]
                  >> > it from a link. I built another quick page with a[/color][/color][/color]
                  link to HTTP_REFERER[color=blue]
                  >check[color=green][color=darkred]
                  >> > page, and all was good. To do final test I made a[/color][/color][/color]
                  copy of the order[color=blue][color=green][color=darkred]
                  >> > confirmation page from Aliant. They use this to[/color][/color][/color]
                  create the link back to[color=blue]
                  >the[color=green][color=darkred]
                  >> > site:
                  >> >
                  >> > <input type="button" name="Continue" value="Continue[/color][/color][/color]
                  Shopping"[color=blue][color=green][color=darkred]
                  >> > onclick="Contin ueShopping[/color][/color][/color]
                  ('http://testsite/supertest.asp') ;">[color=blue][color=green][color=darkred]
                  >> >
                  >> > When i use this code, the HTTP_REFERER does not catch[/color][/color][/color]
                  the URL any more.[color=blue][color=green][color=darkred]
                  >> > Arrrggghhh!!! I cannot make Aliant change the code,[/color][/color][/color]
                  and as it is, it[color=blue]
                  >will[color=green][color=darkred]
                  >> > not be caught with HTTP_REFERER. Very annoying.
                  >> >
                  >> > Any other ideas???
                  >> >
                  >> >
                  >> >
                  >> > Thanks,
                  >> >
                  >> >
                  >> >
                  >> > D
                  >> >
                  >> >
                  >> > "Peter Foti" <peterf@systoli cnetworks.com> wrote in[/color][/color][/color]
                  message[color=blue][color=green][color=darkred]
                  >> > news:vrn3i9g5d8 ji9a@corp.super news.com...
                  >> >
                  >> >>"Drifter" <loreseeker_pri me@hotmail*remo vethis*.com>[/color][/color][/color]
                  wrote in message[color=blue][color=green][color=darkred]
                  >> >>news:bpeuht$2 63$1@nntp-stjh-01-01.rogers.nf.ne t...
                  >> >>
                  >> >>>So - what I want to do is this: Write some code so[/color][/color][/color]
                  that when i[color=blue][color=green][color=darkred]
                  >> >>>click continue shopping, it goes back to the Single[/color][/color][/color]
                  item Purchase page[color=blue][color=green][color=darkred]
                  >> >
                  >> > (as
                  >> >
                  >> >>>it must the way Aliant has it coded). It will only[/color][/color][/color]
                  stay here a sec -[color=blue][color=green][color=darkred]
                  >> >>
                  >> >>because
                  >> >>
                  >> >>>i want to re-route it to the list page, by writing[/color][/color][/color]
                  an "If lastURL was[color=blue][color=green][color=darkred]
                  >> >>
                  >> >>Aliant
                  >> >>
                  >> >>>Checkout screen, then re-route to list screen" type[/color][/color][/color]
                  of code piece - can[color=blue][color=green][color=darkred]
                  >> >>
                  >> >>this
                  >> >>
                  >> >>>be done?
                  >> >>
                  >> >>Couldn't you add some ASP to the top of your Single[/color][/color][/color]
                  item Purchase page[color=blue][color=green][color=darkred]
                  >> >
                  >> > that
                  >> >
                  >> >>checks to see if the Request.ServerV ariables[/color][/color][/color]
                  ("HTTP_REFERER" ) matched the[color=blue][color=green][color=darkred]
                  >> >>checkout page, and if so, Response.Redire ct to the[/color][/color][/color]
                  desired page? In[color=blue]
                  >other[color=green][color=darkred]
                  >> >>words, the user would never be shown the Single Item[/color][/color][/color]
                  Purchase page[color=blue]
                  >because[color=green][color=darkred]
                  >> >>they would transition before anything was displayed[/color][/color][/color]
                  on the screen.[color=blue][color=green][color=darkred]
                  >> >>
                  >> >>Regards,
                  >> >>Peter Foti
                  >> >>
                  >> >>
                  >> >
                  >> >
                  >> >[/color]
                  >>[/color]
                  >
                  >
                  >.
                  >[/color]

                  Comment

                  Working...