Need Some rerouting code... puhleasse

D

Drifter

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
 
D

Drifter

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
 
R

Ray at

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
 
D

Drifter

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
 
A

Aaron

Use a link instead of a form button
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
 
D

Drifter

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

D
 
G

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top