|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi everybody. J/W, how would I go about creating a customizaed error page (404, etc.) so that way when a user goes to an invalid link, it displays what I would like it to. Also, if I had images on this page, would I need to reference them directly (www.technicalgeek.com/bogus.jpg) or could will the page be within the webs folder so I can simply do bogus.jpg
Thanks for any help! |
|
|||
|
What kind of a host are you on?
With Apache, it starts with an .htaccess file, If you are on IIS (wndows 2000/NT), it is more complicated and you probably have to request one through your service. Usually, it is best to have some links to your home page, site map, and contact page on a 404, and sound confident so that yhe visitor is not scared off by "yet another dead-linked site". Something a little humourous or so, but make sure that they have alternatives to the back button, a reason to stay on your site, and an apearance that you are aware of problems, or are nearby - not like the site is abandoned feeling. I hope this makes sense to you, it does to me, and that's what's scary lol. Can you tell us what server you are on, your host? |
|
|||
|
Hey, thanks for the reply!
I am running an Apace server (methinks) using ipowerweb hosting service. If you could tell me how to edit this file, that would be great. Thanks so much... |
|
|||
|
http://www.yourhtmlsource.com/access...m404error.html
Your 404 page is pionted to by your .htaccess file, which is just a text document in your root folder - I think it is called 'docs'. It has the URI of your "404.html" in it, like this: Quote:
Some hosts, but I don't know ipowerweb, have an online control panel that you use to edit the .htaccess. Otherwise, you would use FTP to upload the documents from your hard drivw. And yes, I am pretty sure that you can have images. The 404.html is regular webpage construction (ooh boy !). Actually, I just visited the ipower site, and if I was at the right one, they use a Windows server. I am on readyhosting, which is windows, and I have to put in a 'ticket' to request a 404 page. But ipower has a control panel for online browser management, means that you just use Internet Explorer (etc.) to log in and access your site. So you may have to contact them directly or use your control panel to find out more. Good luck, keep us informed. :O) |
|
|||
|
Hey everybody. I tried to add one now, but I don't think its working properly. I directly edited a file in Dreamweaver called 404.shtml in my main directory.
What am I doing wrong? (BTW, it might be working, I think I just have tons of spyware that are using my 404s to their advantage...) |
|
|||
|
Here's a really good tutorial.....
http://www.outfront.net/tutorials_02...tomerrors1.htm |
|
|||
|
If you have cpanel control panel, it's super easy.
Just copy and paste Either way, be sure your links to pages and image links are absolute, which means http://somedomain.com/ instead of ../ |
|
||||
|
With Ipowerweb and CPanel5 you need to save your error pages first. You do it inside Cpanel. Once you have these files in your root directory you can always change the looks in an editor. extension is always .shtml.
I did check you site and there is no 404.shtml present. You also can create a web page, copy and past the text inside CPanel to the respective error pages. Here is mine: www.absolutelyfabulousflowers.com/404.shtml Maybe somebody can comment on that page if I miss something :-) I did all my error pages just like that and give the customer a chance to go anywhere at my site. :-) Jurgen www.absolutelyfabulousflowers.com |
|
|||
|
Hey Jurgen, thanks for the help.
I did edit my 404.shtml in Dreamweaver, but when I check cpanel under error pages, 404, everything is there. I don't understand why it does not appear in the browser. I know its long, but here is all the code I have in that window. If anything is wrong that is making it not work, please let me know: <body onLoad="MM_preloadImages('technicalgeek_on.gif')"> <table width="800" border="0" > <script language="JavaScript" type="text/JavaScript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.len gth) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.l ength;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <body onLoad="MM_preloadImages('../technicalgeek_on.gif')"> <tr> <td width="250" align="left"><table width="833" border="0"> <tr> <td width="300">[img]technicalgeek_off.gif[/img]</td> <td width="523"><table border="0" cellpadding="0" cellspacing="0" width="520"> <tr> <td>[img]Library/image_slices/spacer.gif[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> <tr> <td colspan="3"> [img]image_slices/amazon-add-conta_r1_c1.jpg[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> <tr> <td rowspan="2"> [img]image_slices/amazon-add-conta_r2_c1.jpg[/img]</td> <td align="center" bgcolor="#0066FF" width="470" height="60" border="0" alt=""> <script language="Javascript"> <!-- var i=j=p=t=u=x=z=dc='';var id=f=0;var f=Math.floor(Math.random()*7777); id=11527; dc=document;u='ht'+'tp://media.fastclick.net/w'; x='/get.media?t=n'; z=' width=468 height=60 border=0 ';t=z+'marginheight=0 marginwidth='; i=u+x+'&sid='+id+'&m=1&f=b&v=1.4&a mp;c='+f+'&r='+escape(dc.referrer); u='<a hr'+'ef="'+u+'/click.here?sid='+id+'&m=1&c='+f+'" target="_blank">'; dc.writeln('<ifr'+'ame src="'+i+'&d=f"'+t+'0 hspace=0 vspace=0 frameborder=0 scrolling=no>'); if(navigator.appName.indexOf('Mic')<=0){dc.writeln (u+'[img]'+i+'&d=n[/img]</a>');} dc.writeln('</iframe>'); // --></script> <noscript> </noscript> </td> <td rowspan="2"> [img]image_slices/amazon-add-conta_r2_c3.jpg[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> <tr> <td> [img]image_slices/amazon-add-conta_r3_c2.jpg[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> </table></td> </tr> </table></td> <td width="524"></td> <td width="12"></td> </tr> </table> <hr color="#000000"> <table border="1" cellspacing="0" style="border-collapse: collapse; border-width: 4" width="100%" cellpadding="0" bordercolor="#111111" height="15"> <tr> <td width="8%" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#666699" height="13"> <p align="center"> [img]upcoming/hl2/home.gif[/img]</td> <td width="13%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#FF3333" height="13"> <p align="center"> [img]upcoming/hl2/access.gif[/img]</td> <td width="9%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#358FE2" height="13"> <p align="center"> [img]upcoming/hl2/game.gif[/img]</td> <td width="11%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#FFAA00" height="13"> <p align="center"> [img]upcoming/hl2/hard.gif[/img]</td> <td width="9%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#CC6699" height="13"> <p align="center"> [img]upcoming/hl2/cheat.gif[/img]</td> <td width="12%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#999966" height="13"> <p align="center"> [img]upcoming/hl2/down.gif[/img]</td> <td width="11%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#FF6600" height="13"> <p align="center"> [img]upcoming/hl2/upcome.gif[/img]</td> <td width="9%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#C0C0C0" height="13"> <p align="center"> [img]upcoming/hl2/forum.gif[/img]</td> <td width="70%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#62A73B" height="13"> <p align="center"> [img]upcoming/hl2/prodfin.gif[/img]</td> </tr> </table> <hr color="#000000"> <table border="3" cellspacing="1" width="100%" height="454"> <tr> <td width="19%" height="449" bgcolor="#0066CC" align="center" valign="top"> <TABLE WIDTH="120" BORDER="1" BGCOLOR="#FFFFFF" ALIGN="center" bordercolor="#000000"> <TR> <TD ALIGN="left" VALIGN="top"> <P ALIGN="center"> <P ALIGN="center"> <font size="2" face="Arial">Find best prices for: </font><font face="Arial"> <LI><font size="2">Motherboards Memory Processors (Box) Cooling Fans Graphics Cards Digital Video Hard Disks DVD ROM CDR/CDRW Multi Media Cases Power Supplies Input Devices Monitors Networking Printers Scanners </font> <LI><font size="2">Software </font> </font> <LI><FONT FACE="Arial" SIZE="2">Notebooks </font> <P ALIGN="center"><FONT FACE="Arial" SIZE="2">Find best price in <SELECT name="topcat_id"> <OPTION selected value="">All Products</OPTION> <option value="1">Computers</OPTION> <option value="9">Software</OPTION> <option value="2">Electronics</OPTION> <option value="3">Video Games</OPTION> </SELECT> for <INPUT name="form_keyword" size=13> <input type=submit width=58 height=20 border=0 value=Search name=Search align=absmiddle> </font> <img src=http://images.pricegrabber.com/images/poweredbypg_wpb.gif width="140" height="31"> </TD> </TR> </TABLE></td> <td width="62%" height="449" valign="top"><p style="margin: 1 7"> </p> <p align="center" style="margin: 1 7; font-size: 36px; color: #FF0000;"> <font face="Arial">OUCHIES!!!</font></p> <p align="center" style="margin: 1 7"><font face="Arial">Looks like you have found a broken link!</font></p> <p align="center" style="margin: 1 7"><font face="Arial">Please sumbit all broken links to</font></p> <p align="center" style="margin: 1 7"><font face="Arial">brokenlink@technicalgeek.com</font></p> <p align="center" style="margin: 1 7"><font face="Arial">So we can make sure this never happens again!</font></p> <p align="center" style="margin: 1 7"><font face="Arial">Thanks...</font></p> <p style="margin: 1 7"> <font face="Arial"> </font></p> <p align="center"></td> <td width="19%" height="449" valign="top"> <p style="margin-top: 1; margin-bottom: 1" align="center"> </p> <p style="margin-top: 1; margin-bottom: 1" align="center"> </p> <p style="margin-top: 1; margin-bottom: 1" align="center"> </p> <p style="margin-top: 1; margin-bottom: 1" align="center"> <font face="Arial"> </font></p> <p align="center"> </p></td> </tr> </table> </p> |
|
|||
|
Jurgen,
I edited it in DW and added in a head and I think some body tags were already there... I am still not seeing anything. the code looks like this now: thanks for the help... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>OUCHIES! TECHNICALGEEK.COM Broken Link!</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body onLoad="MM_preloadImages('technicalgeek_on.gif')"> <table width="800" border="0" > <script language="JavaScript" type="text/JavaScript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.len gth) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.l ength;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <body onLoad="MM_preloadImages('../technicalgeek_on.gif')"> <tr> <td width="250" align="left"><table width="833" border="0"> <tr> <td width="300">[img]technicalgeek_off.gif[/img]</td> <td width="523"><table border="0" cellpadding="0" cellspacing="0" width="520"> <tr> <td>[img]Library/image_slices/spacer.gif[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> <tr> <td colspan="3"> [img]image_slices/amazon-add-conta_r1_c1.jpg[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> <tr> <td rowspan="2"> [img]image_slices/amazon-add-conta_r2_c1.jpg[/img]</td> <td align="center" bgcolor="#0066FF" width="470" height="60" border="0" alt=""> <script language="Javascript"> <!-- var i=j=p=t=u=x=z=dc='';var id=f=0;var f=Math.floor(Math.random()*7777); id=11527; dc=document;u='ht'+'tp://media.fastclick.net/w'; x='/get.media?t=n'; z=' width=468 height=60 border=0 ';t=z+'marginheight=0 marginwidth='; i=u+x+'&sid='+id+'&m=1&f=b&v=1.4&a mp;c='+f+'&r='+escape(dc.referrer); u='<a hr'+'ef="'+u+'/click.here?sid='+id+'&m=1&c='+f+'" target="_blank">'; dc.writeln('<ifr'+'ame src="'+i+'&d=f"'+t+'0 hspace=0 vspace=0 frameborder=0 scrolling=no>'); if(navigator.appName.indexOf('Mic')<=0){dc.writeln (u+'[img]'+i+'&d=n[/img]</a>');} dc.writeln('</iframe>'); // --></script> <noscript> </noscript> </td> <td rowspan="2"> [img]image_slices/amazon-add-conta_r2_c3.jpg[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> <tr> <td> [img]image_slices/amazon-add-conta_r3_c2.jpg[/img]</td> <td>[img]Library/image_slices/spacer.gif[/img]</td> </tr> </table></td> </tr> </table></td> <td width="524"></td> <td width="12"></td> </tr> </table> <hr color="#000000"> <table border="1" cellspacing="0" style="border-collapse: collapse; border-width: 4" width="100%" cellpadding="0" bordercolor="#111111" height="15"> <tr> <td width="8%" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#666699" height="13"> <p align="center"> [img]upcoming/hl2/home.gif[/img]</td> <td width="13%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#FF3333" height="13"> <p align="center"> [img]upcoming/hl2/access.gif[/img]</td> <td width="9%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#358FE2" height="13"> <p align="center"> [img]upcoming/hl2/game.gif[/img]</td> <td width="11%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#FFAA00" height="13"> <p align="center"> [img]upcoming/hl2/hard.gif[/img]</td> <td width="9%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top: medium none #111111; border-bottom: medium none #111111" bgcolor="#CC6699" height="13"> <p align="center"> [img]upcoming/hl2/cheat.gif[/img]</td> <td width="12%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#999966" height="13"> <p align="center"> [img]upcoming/hl2/down.gif[/img]</td> <td width="11%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#FF6600" height="13"> <p align="center"> [img]upcoming/hl2/upcome.gif[/img]</td> <td width="9%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#C0C0C0" height="13"> <p align="center"> [img]upcoming/hl2/forum.gif[/img]</td> <td width="70%" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#62A73B" height="13"> <p align="center"> [img]upcoming/hl2/prodfin.gif[/img]</td> </tr> </table> <hr color="#000000"> <table border="3" cellspacing="1" width="100%" height="454"> <tr> <td width="19%" height="449" bgcolor="#0066CC" align="center" valign="top"> <TABLE WIDTH="120" BORDER="1" BGCOLOR="#FFFFFF" ALIGN="center" bordercolor="#000000"> <TR> <TD ALIGN="left" VALIGN="top"> <P ALIGN="center"> <P ALIGN="center"> <font size="2" face="Arial">Find best prices for: </font><font face="Arial"> <LI><font size="2">Motherboards Memory Processors (Box) Cooling Fans Graphics Cards Digital Video Hard Disks DVD ROM CDR/CDRW Multi Media Cases Power Supplies Input Devices Monitors Networking Printers Scanners </font> <LI><font size="2">Software </font> </font> <LI><FONT FACE="Arial" SIZE="2">Notebooks </font> <P ALIGN="center"><FONT FACE="Arial" SIZE="2">Find best price in <SELECT name="topcat_id"> <OPTION selected value="">All Products</OPTION> <option value="1">Computers</OPTION> <option value="9">Software</OPTION> <option value="2">Electronics</OPTION> <option value="3">Video Games</OPTION> </SELECT> for <INPUT name="form_keyword" size=13> <input type=submit width=58 height=20 border=0 value=Search name=Search align=absmiddle> </font> <img src=http://images.pricegrabber.com/images/poweredbypg_wpb.gif width="140" height="31"> </TD> </TR> </TABLE></td> <td width="62%" height="449" valign="top"><p style="margin: 1 7"> </p> <p align="center" style="margin: 1 7; font-size: 36px; color: #FF0000;"> <font face="Arial">OUCHIES!!!</font></p> <p align="center" style="margin: 1 7"><font face="Arial">Looks like you have found a broken link!</font></p> <p align="center" style="margin: 1 7"><font face="Arial">Please sumbit all broken links to</font></p> <p align="center" style="margin: 1 7"><font face="Arial">brokenlink@technicalgeek.com</font></p> <p align="center" style="margin: 1 7"><font face="Arial">So we can make sure this never happens again!</font></p> <p align="center" style="margin: 1 7"><font face="Arial">Thanks...</font></p> <p style="margin: 1 7"> <font face="Arial"> </font></p> <p align="center"></td> <td width="19%" height="449" valign="top"> <p style="margin-top: 1; margin-bottom: 1" align="center"> </p> <p style="margin-top: 1; margin-bottom: 1" align="center"> </p> <p style="margin-top: 1; margin-bottom: 1" align="center"> </p> <p style="margin-top: 1; margin-bottom: 1" align="center"> <font face="Arial"> </font></p> <p align="center"> </p></td> </tr> </table> </p> </body> </html> |
|
||||
|
Is your 404.shtml in your root directory?
Try this: Go to your Cpanel, delete the 404.shtml file. Go to your error pages (in Cpanel) type something and save it. Then download the created 404 file with FTP, and if possible e-mail me this file. Jurgen |
|
|||
|
Ok here is what I did... I took the 404.shtml file out of my local drive (the one i made in the last post) and ftp'd it up to the main directory.
I still don't think its working now, so I really don't know whats going on... Thanks for helpin! |
|
||||
|
Here is what I see.... :-)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>OUCHIES! TECHNICALGEEK.COM Broken Link!</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> (none) 12.72.169.239 /404.shtml www.technicalgeek.com Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 (none) Try to get rid of all your fancy java script and try to type something simple in your body tag, Maybe try to make just a link back to your home page for a start.... The file is there it just doesn't come over. Jurgen |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |