Jump to content

Recommended Posts

Posted

Hello.

 

I have been advised to check through my web host to find out how to change the "file not found" messages to look more customized and less appearing to me a mistake. When people come across an "error page" they may think it a mistake or problem and go somewhere else.

 

I'd like to be able to personalize the error page and redirect them back to my home page.

 

Any suggestions would be great.

 

Thanks, :)

Posted

Thanks Bruce for the link.

The tutorial did not define these buttons listed above the .shtml editor box:

 

1)Referring URL

2)Visitor's IP Address

3)Requested URL

4)Server Name

5)Visitor's browser

6)Redirect Status Code

 

I cut and pasted some html into the window on the "Editing 404 shtml..." page in order to personalize the page, but I don't know which of these above selections to add, and in what order. Is there a preview button for this editor so I can check how it looks?

 

I want to stop the visitor from closing the browser and instead give that person a link to send him back to the homepage.

 

How do I use these insert codes? Is it complicated?

 

The tutorial helped me find the location for the error page editing..but that was as far as it went.

 

Maybe I am asking something I ought to already know...????

 

I notice when I click on the buttons mentioned above, the code displays in a "comment out" form, at least in html language.

 

I am assuming I then copy and paste the entire page into my html editor and save it as a .html document, then upload it into my website...

Does this sound right?

 

Just looking for direction. :)

Thanks.

Posted
The tutorial did not define these buttons listed above the .shtml editor box:

 

1)Referring URL

2)Visitor's IP Address

3)Requested URL

4)Server Name

5)Visitor's browser

6)Redirect Status Code

 

I cut and pasted some html into the window on the "Editing 404 shtml..." page in order to personalize the page, but I don't know which of these above selections to add, and in what order. 

The buttons are predefined fields that the server will fill in at the time a user actually encounters a 404 error. For example, the server will replace the code for "Requested URL" with the URL of the page that user was actually trying to browse to. My 404 page has the following code in it:

><p>The page you requested could not be found (Error 404):<br />
http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --></p>

The code on the second line is what's needed to build a full URL of the requested page. It's "http://" plus the code from the "Server Name" button, then the code from the "Requested URL" button.

 

I don't know that any of the code from the other buttons would be of much use on a 404 page, unless you just want to display it because you can. There is no requirement that you use code from any of the buttons - it is up to you what you want to display on your 404 page.

 

Is there a preview button for this editor so I can check how it looks?

There is no preview available in the CPanel editor - about all you can do is save the page, then deliberately browse to a URL on your site that you know doesn't exist, causing the server to show you the 404 page you just saved.

 

I want to stop the visitor from closing the browser and instead give that person a link to send him back to the homepage.

You can't really "stop" the visitor from closing their browser, but you certainly can include a link back to your home page (I have one on my 404 page as well).

 

How do I use these insert codes?  Is it complicated?

The codes are just fields, each representing a piece of information to be displayed. Wherever you want to display one of those fields, you insert the code for that field by clicking one of the buttons above the editor.

 

I notice when I click on the buttons mentioned above, the code displays in a "comment out" form, at least in html language. 

Yes, the code is an HTML comment, but within the comment is special code that has meaning to the server, and the server will process that code when it serves the page.

 

I am assuming I then copy and paste the entire page into my html editor and save it as a .html document, then upload it into my website...

Does this sound right?

When you save the file in the "CPanel .shtml editor", it will be automatically saved on the server as 404.shtml (unless you rename it to something else). You don't need to do anything further other than save it.

 

Hope this helps...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...