redirect user to another page if error 404

Thread Solved

Join Date: Feb 2009
Posts: 15
Reputation: mohamed1 is an unknown quantity at this point 
Solved Threads: 0
mohamed1 mohamed1 is offline Offline
Newbie Poster

redirect user to another page if error 404

 
0
  #1
Feb 23rd, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 66
Reputation: Baradaran is an unknown quantity at this point 
Solved Threads: 4
Baradaran Baradaran is offline Offline
Junior Poster in Training

Re: redirect user to another page if error 404

 
0
  #2
Feb 23rd, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 10
Reputation: themightycrag is an unknown quantity at this point 
Solved Threads: 3
themightycrag themightycrag is offline Offline
Newbie Poster

Re: redirect user to another page if error 404

 
0
  #3
Feb 28th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 15
Reputation: mohamed1 is an unknown quantity at this point 
Solved Threads: 0
mohamed1 mohamed1 is offline Offline
Newbie Poster

Re: redirect user to another page if error 404

 
0
  #4
Feb 28th, 2009
Originally Posted by themightycrag View Post
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?!?!?
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 119
Reputation: agrothe is an unknown quantity at this point 
Solved Threads: 14
agrothe's Avatar
agrothe agrothe is offline Offline
Junior Poster

Re: redirect user to another page if error 404

 
0
  #5
Feb 28th, 2009
Originally Posted by mohamed1 View Post
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.
------------------------------------------------------------
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 15
Reputation: mohamed1 is an unknown quantity at this point 
Solved Threads: 0
mohamed1 mohamed1 is offline Offline
Newbie Poster

Re: redirect user to another page if error 404

 
0
  #6
Jul 2nd, 2009
thanks this helps
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 36
Reputation: tomer1 is an unknown quantity at this point 
Solved Threads: 1
tomer1 tomer1 is offline Offline
Light Poster

Re: redirect user to another page if error 404

 
0
  #7
Jul 16th, 2009
There's a code you can use with redirect..

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

Try it
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 36
Reputation: tomer1 is an unknown quantity at this point 
Solved Threads: 1
tomer1 tomer1 is offline Offline
Light Poster

Re: redirect user to another page if error 404

 
0
  #8
Jul 16th, 2009
I'm sorry,
I just chack it and its goes like that: If Err <> 0 Then NOT If error <> 0
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC