Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

404 Question

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Request for setting a cookie . . .  
Author Message
user135

External


Since: Jul 14, 2003
Posts: 15



(Msg. 1) Posted: Tue Sep 30, 2003 3:30 am
Post subject: 404 Question
Archived from groups: alt>www>webmaster (more info?)

Is there a way to have some code that if someone goes to a page that is a
404, it runs an SSI.

As an example, if someone went to the webpage www.url.com/test1.shtml, the
404 would load the following:

<!--#include virtual="page.cgi?test1.shtml" -->

On the other hand, if someone went to the webpage www.url.com/test2.shtml,
the 404 would load the following:

<!--#include virtual="page.cgi?test2.shtml" -->

Thanks

 >> Stay informed about: 404 Question 
Back to top
Login to vote
tina

External


Since: Jun 28, 2003
Posts: 344



(Msg. 2) Posted: Tue Sep 30, 2003 3:30 am
Post subject: Re: 404 Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"(a)" <nospam DeleteThis @spam.com> wrote in message
news:L84eb.47030$TM4.43399@pd7tw2no...
 > Is there a way to have some code that if someone goes to a page that is a
 > 404, it runs an SSI.
 >
 > As an example, if someone went to the webpage <a style='text-decoration: underline;' href="http://www.url.com/test1.shtml," target="_blank">www.url.com/test1.shtml,</a> the
 > 404 would load the following:
 >
 > <!--#include virtual="page.cgi?test1.shtml" -->
 >
<font color=purple> > On the other hand, if someone went to the webpage <a style='text-decoration: underline;' href="http://www.url.com/test2.shtml,</font" target="_blank">www.url.com/test2.shtml,</font</a>>
 > the 404 would load the following:
 >
 > <!--#include virtual="page.cgi?test2.shtml" -->
 >
 > Thanks


If you're loading files, if someone goes to a specific URL, then it isn't
really a 404. What you're talking about sounds more like a redirect.

--Tina
--
<a style='text-decoration: underline;' href="http://www.AffordableHOST.com" target="_blank">http://www.AffordableHOST.com</a>
LiveChat: <a style='text-decoration: underline;' href="http://chat.affordablehost.com" target="_blank">http://chat.affordablehost.com</a>
20% Discount Code: newsgroup
Serving the web since 1997<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: 404 Question 
Back to top
Login to vote
user135

External


Since: Jul 14, 2003
Posts: 15



(Msg. 3) Posted: Tue Sep 30, 2003 5:39 am
Post subject: Re: 404 Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It doesn't really matter if you want to call it a 404 or a redirect. It is
however a 404 because those urls don't exist. In either case, I'm wondering
how it would be done.

 > If you're loading files, if someone goes to a specific URL, then it isn't
 > really a 404. What you're talking about sounds more like a redirect.
 >
 > --Tina
 > --
<font color=purple> > <a style='text-decoration: underline;' href="http://www.AffordableHOST.com</font" target="_blank">http://www.AffordableHOST.com</font</a>>
<font color=purple> > LiveChat: <a style='text-decoration: underline;' href="http://chat.affordablehost.com</font" target="_blank">http://chat.affordablehost.com</font</a>>
 > 20% Discount Code: newsgroup
 > Serving the web since 1997
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: 404 Question 
Back to top
Login to vote
rfgdxm3

External


Since: Sep 21, 2003
Posts: 93



(Msg. 4) Posted: Tue Sep 30, 2003 5:39 am
Post subject: Re: 404 Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

(a) wrote:
 > It doesn't really matter if you want to call it a 404 or a redirect.
 > It is however a 404 because those urls don't exist. In either case,
 > I'm wondering how it would be done.

What server code are you going to be returning?
--
<a style='text-decoration: underline;' href="http://www.dextromethorphan.ws/" target="_blank">http://www.dextromethorphan.ws/</a>
For information about the psychedelic drug DXM, including dangers.
Yet another murder by someone on Coricidin:
<a style='text-decoration: underline;' href="http://www.coricidin.org/kansas-coricidin-murder.htm" target="_blank">http://www.coricidin.org/kansas-coricidin-murder.htm</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: 404 Question 
Back to top
Login to vote
grocer

External


Since: Sep 26, 2003
Posts: 25



(Msg. 5) Posted: Tue Sep 30, 2003 6:17 am
Post subject: Re: 404 Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You can set your site to use any page for error 404 (or any other error, for
that matter). The page can be anything that works on your site (htm, ASP,
CGI, etc). The page can do anything you like, including temporary or
permanent redirection.

The request object holds the info you need, such as the URL the user
actually asked for.

Redirection as you describe it is very common. In my case I reorganized the
site completely a while back. My error404.asp has a table of pages that got
moved, so when there's a request for one of the old URLs, the user gets a
permanent redirection to the new URL and the page is displayed without the
user seeing any error message at all.




"(a)" <nospam.TakeThisOut@spam.com> wrote in message
news:L84eb.47030$TM4.43399@pd7tw2no...
 > Is there a way to have some code that if someone goes to a page that is a
 > 404, it runs an SSI.
 >
 > As an example, if someone went to the webpage <a style='text-decoration: underline;' href="http://www.url.com/test1.shtml," target="_blank">www.url.com/test1.shtml,</a> the
 > 404 would load the following:
 >
 > <!--#include virtual="page.cgi?test1.shtml" -->
 >
<font color=purple> > On the other hand, if someone went to the webpage <a style='text-decoration: underline;' href="http://www.url.com/test2.shtml,</font" target="_blank">www.url.com/test2.shtml,</font</a>>
 > the 404 would load the following:
 >
 > <!--#include virtual="page.cgi?test2.shtml" -->
 >
 > Thanks
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: 404 Question 
Back to top
Login to vote
user135

External


Since: Jul 14, 2003
Posts: 15



(Msg. 6) Posted: Tue Sep 30, 2003 6:46 am
Post subject: Re: 404 Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Essentially, the cgi script page.cgi creates the webpage dynamically.

This way someone could type the url <a style='text-decoration: underline;' href="http://www.url.com/asasdflhjdf.html" target="_blank">http://www.url.com/asasdflhjdf.html</a> or
<a style='text-decoration: underline;' href="http://www.url.com/test.html" target="_blank">http://www.url.com/test.html</a> and both would get redirected to the page.cgi
script.

In the first case, they would go to
<a style='text-decoration: underline;' href="http://www.url.com/page.cgi?asasdflhjdf.html" target="_blank">http://www.url.com/page.cgi?asasdflhjdf.html</a> and in the second case they
would go to <a style='text-decoration: underline;' href="http://www.url.com/page.cgi?test.html" target="_blank">http://www.url.com/page.cgi?test.html</a>

In each case, the url in the address bar would be what they typed, but by
using ssi, the page that shows would generate dynamically.


"rfgdxm/Robert F. Golaszewski" <rfgdxm RemoveThis @KILLSPAMMERSmochamail.com> wrote in
message news:3f78eeb9$0$9999$892e7fe2@authen.puce.readfreenews.net...
 > (a) wrote:
  > > It doesn't really matter if you want to call it a 404 or a redirect.
  > > It is however a 404 because those urls don't exist. In either case,
  > > I'm wondering how it would be done.
 >
 > What server code are you going to be returning?
 > --
<font color=purple> > <a style='text-decoration: underline;' href="http://www.dextromethorphan.ws/</font" target="_blank">http://www.dextromethorphan.ws/</font</a>>
 > For information about the psychedelic drug DXM, including dangers.
 > Yet another murder by someone on Coricidin:
<font color=purple> > <a style='text-decoration: underline;' href="http://www.coricidin.org/kansas-coricidin-murder.htm</font" target="_blank">http://www.coricidin.org/kansas-coricidin-murder.htm</font</a>>
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: 404 Question 
Back to top
Login to vote
rfgdxm3

External


Since: Sep 21, 2003
Posts: 93



(Msg. 7) Posted: Tue Sep 30, 2003 6:46 am
Post subject: Re: 404 Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > "rfgdxm/Robert F. Golaszewski" <rfgdxm.RemoveThis@KILLSPAMMERSmochamail.com>

  >> What server code are you going to be returning?

(a) wrote:
 > Essentially, the cgi script page.cgi creates the webpage dynamically.
 >
 > This way someone could type the url
<font color=purple> > <a style='text-decoration: underline;' href="http://www.url.com/asasdflhjdf.html" target="_blank">http://www.url.com/asasdflhjdf.html</a> or <a style='text-decoration: underline;' href="http://www.url.com/test.html</font" target="_blank">http://www.url.com/test.html</font</a>>
 > and both would get redirected to the page.cgi script.
 >
 > In the first case, they would go to
 > <a style='text-decoration: underline;' href="http://www.url.com/page.cgi?asasdflhjdf.html" target="_blank">http://www.url.com/page.cgi?asasdflhjdf.html</a> and in the second case
<font color=purple> > they would go to <a style='text-decoration: underline;' href="http://www.url.com/page.cgi?test.html</font" target="_blank">http://www.url.com/page.cgi?test.html</font</a>>
 >
 > In each case, the url in the address bar would be what they typed,
 > but by using ssi, the page that shows would generate dynamically.

In that case, what you are doing is a Very Bad Thing, so quit doing
it. You can cause serious problems with search engines unless you are
returning the correct status codes.

<a style='text-decoration: underline;' href="http://www.w3.org/Protocols/HTTP/1.0/spec.html" target="_blank">http://www.w3.org/Protocols/HTTP/1.0/spec.html</a>

It is OK to have customized pages so long as you also return the
correct status code. This includes the 301 and 302 status codes.
--
<a style='text-decoration: underline;' href="http://www.dextromethorphan.ws/" target="_blank">http://www.dextromethorphan.ws/</a>
For information about the psychedelic drug DXM, including dangers.
Yet another murder by someone on Coricidin:
<a style='text-decoration: underline;' href="http://www.coricidin.org/kansas-coricidin-murder.htm" target="_blank">http://www.coricidin.org/kansas-coricidin-murder.htm</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: 404 Question 
Back to top
Login to vote
user135

External


Since: Jul 14, 2003
Posts: 15



(Msg. 8) Posted: Tue Sep 30, 2003 7:55 am
Post subject: Re: 404 Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm not following, what is bad about it?

All I want to do is if someone types in the wrong url, it goes to a 404 page
as if the page the person typed in actually existed. I don't want a generic
404 page, just a page that looks like what the surfer requested.


"rfgdxm/Robert F. Golaszewski" <rfgdxm.RemoveThis@KILLSPAMMERSmochamail.com> wrote in
message news:3f7901c8$0$9996$892e7fe2@authen.puce.readfreenews.net...
  > > "rfgdxm/Robert F. Golaszewski" <rfgdxm.RemoveThis@KILLSPAMMERSmochamail.com>
 >
   > >> What server code are you going to be returning?
 >
 > (a) wrote:
  > > Essentially, the cgi script page.cgi creates the webpage dynamically.
  > >
  > > This way someone could type the url
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.url.com/asasdflhjdf.html" target="_blank">http://www.url.com/asasdflhjdf.html</a> or <a style='text-decoration: underline;' href="http://www.url.com/test.html</font" target="_blank">http://www.url.com/test.html</font</a>>
  > > and both would get redirected to the page.cgi script.
  > >
  > > In the first case, they would go to
  > > <a style='text-decoration: underline;' href="http://www.url.com/page.cgi?asasdflhjdf.html" target="_blank">http://www.url.com/page.cgi?asasdflhjdf.html</a> and in the second case
<font color=green>  > > they would go to <a style='text-decoration: underline;' href="http://www.url.com/page.cgi?test.html</font" target="_blank">http://www.url.com/page.cgi?test.html</font</a>>
  > >
  > > In each case, the url in the address bar would be what they typed,
  > > but by using ssi, the page that shows would generate dynamically.
 >
 > In that case, what you are doing is a Very Bad Thing, so quit doing
 > it. You can cause serious problems with search engines unless you are
 > returning the correct status codes.
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.w3.org/Protocols/HTTP/1.0/spec.html</font" target="_blank">http://www.w3.org/Protocols/HTTP/1.0/spec.html</font</a>>
 >
 > It is OK to have customized pages so long as you also return the
 > correct status code. This includes the 301 and 302 status codes.
 > --
<font color=purple> > <a style='text-decoration: underline;' href="http://www.dextromethorphan.ws/</font" target="_blank">http://www.dextromethorphan.ws/</font</a>>
 > For information about the psychedelic drug DXM, including dangers.
 > Yet another murder by someone on Coricidin:
<font color=purple> > <a style='text-decoration: underline;' href="http://www.coricidin.org/kansas-coricidin-murder.htm</font" target="_blank">http://www.coricidin.org/kansas-coricidin-murder.htm</font</a>>
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: 404 Question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
PDF Question - Does anyone know of a way of converting a PDF file into Word or frontpage without losing any of the formatting? I have a flyer to turn into a webpage with numerous images and formatted text blocks which if i save as an image takes about 90 secs to..

zip question - Hope someone can shed some light on this for me. Thing is im moving servers soon and need to transfer over my databases, I can create the accounts easy enough, and have no problem modifying the databases so things work ok. The problem i have is how do ...

An is it possible question - Hi, I have a membership application form on the Animals in Distress website at http://www.animals-in-distress.net/memapp.htm for people to fill in then print and send with a cheque, I wonder if it is possible to have it place the amount in the Amount...

Co-Lo pricing question. - I'm looking to move my busy site http://www.readnotify.com to a US hosting provider (my server is in the UK presently; where there are no bandwidth charges), but I have no idea what co-location prices and bandwidth charges should be over there; nor what....

SQL noob question - If I have an SQL dbase on one website, can I access it from another? Tx. -- Rocky [ICQ UIN 41113560] www.GhostRecon.net | www.AGR-S.com
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]