how to do this?

B

boohoo

On 10 Jun 2004 18:00:29 -0700, (e-mail address removed) (Blue) wrote:

what the hell are you talking about?
 
B

Blue

Sorry, I was in rather a rush, I'll try again:

If the user trys to go to page http://www.domain.com/widget.htm but
the page doesnt exsist

How can I then return a page called widget.htm which is infact a site
search for the term 'widget'

Hope this is clearer

Thanks
 
M

Michael Elfial

Hi,

I did something like that on my site - not exactly for searching but in
general similar.
Configure an error ASP page. Configure site to handle all the errors that
may happen -404 (page not found), 403 (forbidden - for directory listing)
and may be 405 too - configure the same page by specifying the virtual path
to it in the IIS configuration.

Then in the page you have to use the
Request.ServerVariables("QUERY_STRING"). Better do simple page configure it
as said above and take a look at what the variable contains. You will notice
that it is a bit different from what normal ASP pages will get something
like:

errcode;the original url

Then you just need to Split it and process further the original URL. After
determining the parameters you want to use from it you can redirect to your
search page with them. BTW you can use not only the last part but also some
other parts of the url.

For an example how it works you can see the redirection that occurs on my
site for example for something lik this:
http://www.newobjects.com/prodct/Category/57/Story/311/

Regards
Michael
 

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

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,408
Latest member
AlenaRay88

Latest Threads

Top