Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Redirecting a 404 error

Reply
Thread Tools

Redirecting a 404 error

 
 
Corona
Guest
Posts: n/a
 
      06-23-2005
I have an ASP.NET page on a local server. On an internet website I have a
page that redirects to the local page.

The problem is that the local page has a dynamic IP address and is behind a
firewall. So, I wrote an application that periodotically goes out on the net
and gets my public address. It compares the public address to see if it's
changed since the last time it was checked. If it changed the app generates
an HTML redirection page with the new IP address and uploads it to the
internet site.

What I want to be able to do is change the behavior of the redirection page
so that it asks the user to try again in a few minutes instead of giving a
404 page not found error. Is that possible in HTML? I don't want to resort
to server side scripts for a couple of reasons. I'm not sure what
capabilites the site supports and 2nd, I just don't want to learn another
damn language if I can help it...


 
Reply With Quote
 
 
 
 
Joker7
Guest
Posts: n/a
 
      06-23-2005

"Corona" <(E-Mail Removed)> wrote in message
news:h0Eue.4559$(E-Mail Removed) m...
:I have an ASP.NET page on a local server. On an internet website I have a
: page that redirects to the local page.
:
: The problem is that the local page has a dynamic IP address and is behind
a
: firewall. So, I wrote an application that periodotically goes out on the
net
: and gets my public address. It compares the public address to see if it's
: changed since the last time it was checked. If it changed the app
generates
: an HTML redirection page with the new IP address and uploads it to the
: internet site.
:
: What I want to be able to do is change the behavior of the redirection
page
: so that it asks the user to try again in a few minutes instead of giving a
: 404 page not found error. Is that possible in HTML? I don't want to resort
: to server side scripts for a couple of reasons. I'm not sure what
: capabilites the site supports and 2nd, I just don't want to learn another
: damn language if I can help it...
:
:Take a look here:
http://www.tastypopsicle.com/404.asp

Cheers
Chris

kick-butt.co.uk


 
Reply With Quote
 
 
 
 
Corona
Guest
Posts: n/a
 
      06-24-2005
Thanks Joker. That's an interesting page but it doesn't solve my problem.

The site that needs to generate a custom page doesn't support ASP or
ASP.NET... It claims to support cgi but I haven't been able to get that to
work yet so I stuck with HTML and JavaScript.

"Joker7" <(E-Mail Removed)> wrote in message
news:1119570538.55d29e4dc1f000369ee4d2742a989fa9@t eranews...
>
> "Corona" <(E-Mail Removed)> wrote in message
> news:h0Eue.4559$(E-Mail Removed) m...
> :I have an ASP.NET page on a local server. On an internet website I have a
> : page that redirects to the local page.
> :
> : The problem is that the local page has a dynamic IP address and is
> behind
> a
> : firewall. So, I wrote an application that periodotically goes out on the
> net
> : and gets my public address. It compares the public address to see if
> it's
> : changed since the last time it was checked. If it changed the app
> generates
> : an HTML redirection page with the new IP address and uploads it to the
> : internet site.
> :
> : What I want to be able to do is change the behavior of the redirection
> page
> : so that it asks the user to try again in a few minutes instead of giving
> a
> : 404 page not found error. Is that possible in HTML? I don't want to
> resort
> : to server side scripts for a couple of reasons. I'm not sure what
> : capabilites the site supports and 2nd, I just don't want to learn
> another
> : damn language if I can help it...
> :
> :Take a look here:
> http://www.tastypopsicle.com/404.asp
>
> Cheers
> Chris
>
> kick-butt.co.uk
>
>



 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      06-24-2005
On Thu, 23 Jun 2005 19:25:01 GMT, "Corona"
<(E-Mail Removed)> wrote:

>The problem is that the local page has a dynamic IP address and is behind a
>firewall. So, I wrote an application that periodotically goes out on the net
>and gets my public address.


This is a DNS issue. If you can't fix it that way, then do it by
server-side scripting. You can't fix it with HTML.

In general, dump a M$oft OS for this sort of task and put a Unix box
somewhere visible. M$oft's IP-level tools are rubbish.

 
Reply With Quote
 
Corona
Guest
Posts: n/a
 
      06-24-2005

"Andy Dingley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Thu, 23 Jun 2005 19:25:01 GMT, "Corona"
> <(E-Mail Removed)> wrote:
>
>>The problem is that the local page has a dynamic IP address and is behind
>>a
>>firewall. So, I wrote an application that periodotically goes out on the
>>net
>>and gets my public address.

>
> This is a DNS issue. If you can't fix it that way, then do it by
> server-side scripting. You can't fix it with HTML.


I'm not sure what you're talking about here... The problem is not in finding
my public IP. It's replacing the 404 page with a "Temporarily not available"
page when the site can't find my dynamic IP.

> In general, dump a M$oft OS for this sort of task and put a Unix box
> somewhere visible. M$oft's IP-level tools are rubbish.


Well, as far as that goes, I like MS and ASP.NET. I don't see the draw for
Linux and the like...


 
Reply With Quote
 
GuyBrush Treepwood
Guest
Posts: n/a
 
      06-25-2005
On Thu, 23 Jun 2005 19:25:01 +0000, Corona wrote:

> I have an ASP.NET page on a local server. On an internet website I have a
> page that redirects to the local page.
>
> The problem is that the local page has a dynamic IP address and is behind a
> firewall. So, I wrote an application that periodotically goes out on the net
> and gets my public address. It compares the public address to see if it's
> changed since the last time it was checked. If it changed the app generates
> an HTML redirection page with the new IP address and uploads it to the
> internet site.
>
> What I want to be able to do is change the behavior of the redirection page
> so that it asks the user to try again in a few minutes instead of giving a
> 404 page not found error. Is that possible in HTML? I don't want to resort
> to server side scripts for a couple of reasons. I'm not sure what
> capabilites the site supports and 2nd, I just don't want to learn another
> damn language if I can help it...


Is it an apache webserver? Then you can put a .htaccess file in the top
directory, with the error redirection.

--
"Don't worry about people stealing your ideas. If your ideas are any good,
you'll have to ram them down people's throats."
-- Howard Aiken


 
Reply With Quote
 
Corona
Guest
Posts: n/a
 
      06-26-2005

"GuyBrush Treepwood" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> On Thu, 23 Jun 2005 19:25:01 +0000, Corona wrote:
>
>> I have an ASP.NET page on a local server. On an internet website I have a
>> page that redirects to the local page.
>>
>> The problem is that the local page has a dynamic IP address and is behind
>> a
>> firewall. So, I wrote an application that periodotically goes out on the
>> net
>> and gets my public address. It compares the public address to see if it's
>> changed since the last time it was checked. If it changed the app
>> generates
>> an HTML redirection page with the new IP address and uploads it to the
>> internet site.
>>
>> What I want to be able to do is change the behavior of the redirection
>> page
>> so that it asks the user to try again in a few minutes instead of giving
>> a
>> 404 page not found error. Is that possible in HTML? I don't want to
>> resort
>> to server side scripts for a couple of reasons. I'm not sure what
>> capabilites the site supports and 2nd, I just don't want to learn another
>> damn language if I can help it...

>
> Is it an apache webserver? Then you can put a .htaccess file in the top
> directory, with the error redirection.


Thanks. I haven't gotten around to it yet but I'm planning on trying that.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error With Bound Control Causes redirection to 404 Error page instead of displaying error Bishop ASP .Net 1 02-24-2007 09:42 PM
Intercept IIS 404 errors? Issue with Viewstate and 404 Jonathan Folland ASP .Net 2 03-17-2005 02:32 AM
Redirecting on Failed Image 404 Keith ASP General 1 03-09-2005 03:10 PM
Redirecting favicon.ico in the Error 404 handler? Bill ASP General 2 09-09-2004 09:49 PM
Redirecting to the default 404 page Nobody ASP .Net 2 02-04-2004 07:51 AM



Advertisments