943,725 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Marked Solved
  • Views: 2905
  • ASP RSS
Feb 23rd, 2009
0

redirect user to another page if error 404

Expand Post »
Hi all :rolleyes:
redirect user to another page
in some sites if i typed address wrong it redirect me to another page in site
home page for example
instead of error page 404 appears to me
is it should have Global.asa
is there another way
please help
Similar Threads
Reputation Points: 8
Solved Threads: 0
Newbie Poster
mohamed1 is offline Offline
15 posts
since Feb 2009
Feb 23rd, 2009
0

Re: redirect user to another page if error 404

Hi,
This has nothing to do with ASP. ASP can only act when the called file is existing.

Some providers offer the option for customized error pages. If you provider does it as well, then you can customize them according to your needs.

If you are running your own server, then navigate to the properties of the related website in IIS, click Custom Errors and change the content of the default error pages.

Good luck,
Ali Baradaran
Reputation Points: 11
Solved Threads: 7
Junior Poster in Training
Baradaran is offline Offline
88 posts
since Feb 2007
Feb 28th, 2009
0

Re: redirect user to another page if error 404

If you have access to the IIS interface then select the website you want to change, right click then select propertries and in the properties window select custom errors.

You can then select the error (404.asp for example) and either point it to a file on your server a url page that you have created.
Reputation Points: 10
Solved Threads: 3
Newbie Poster
themightycrag is offline Offline
10 posts
since Feb 2009
Feb 28th, 2009
0

Re: redirect user to another page if error 404

If you have access to the IIS interface then select the website you want to change, right click then select propertries and in the properties window select custom errors.

You can then select the error (404.asp for example) and either point it to a file on your server a url page that you have created.
thank u for reply
so i think if site is not on my computer
i just hired space and domain
i must call the company i hired from
and tell them to do as u told

is that no other way because they are with very slow response?!?!?
Reputation Points: 8
Solved Threads: 0
Newbie Poster
mohamed1 is offline Offline
15 posts
since Feb 2009
Feb 28th, 2009
0

Re: redirect user to another page if error 404

Click to Expand / Collapse  Quote originally posted by mohamed1 ...
thank u for reply
so i think if site is not on my computer
i just hired space and domain
i must call the company i hired from
and tell them to do as u told

is that no other way because they are with very slow response?!?!?

Most hosts support uploading your own 404.asp and check there first by default. Also, try this page for more information.
Reputation Points: 37
Solved Threads: 18
Junior Poster
agrothe is offline Offline
151 posts
since Jun 2006
Jul 2nd, 2009
0

Re: redirect user to another page if error 404

thanks this helps
Reputation Points: 8
Solved Threads: 0
Newbie Poster
mohamed1 is offline Offline
15 posts
since Feb 2009
Jul 16th, 2009
0

Re: redirect user to another page if error 404

There's a code you can use with redirect..

I think it goes like that..
If error <> 0 then
Response.redirect "URL"

Try it
Reputation Points: 10
Solved Threads: 1
Light Poster
tomer1 is offline Offline
42 posts
since Jun 2008
Jul 16th, 2009
0

Re: redirect user to another page if error 404

I'm sorry,
I just chack it and its goes like that: If Err <> 0 Then NOT If error <> 0
Reputation Points: 10
Solved Threads: 1
Light Poster
tomer1 is offline Offline
42 posts
since Jun 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: ASP Email Form Sending but Content Not Being Sent
Next Thread in ASP Forum Timeline: Inserting/Editing in a gridview





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC