Creating a 404 error page

67

By R.Araujo

404 page error

When, about a month, I chose to change the platform for sales of my first shop of electronic commerce for CubeCart, encountered a problem with me. The previous store had many pages indexed, and received several visits from search engines. With this change in the platform of sales, these pages no longer exist, and those who demand through search engines vai find a page in "white" with an error 404, served by the shelter.

I saw me on the need to create a page to guide these visitors, and provide them options, or at least the return to the "home page" on the site. Contrary to what might think, this is nothing harder to do.

ERROR 404

The first thing to do is create a page that they want to show people looking for something that is no longer on your site. Then there are the file. Htaccess on the server and insert it the following code (have to download the same):

ErrorDocument 404 / pagina404.html

where the "pagina404.html" is the page you have just created, and that this case is the "root of the site," then the "/" before the name of the page. In case of failure to file. Htaccess, can create it. They open a word processor normal, and insert the code that I mentioned. Then store the file a name with any (may be texto.txt), and are uploaded to the server. Once ai, change the file name to. "Htaccess".

If the page of error is another folder, just insert the name of that, and here are with something like this:

ErrorDocument 404 / nomedapasta/pagina404.html

Similarly they have done this page of error, may make other pages for other more common errors, such as the error 401 (unauthorized), and the error 403 (page forbidden). In this case podiamos insert the following code:

ErrorDocument 401 / paginanaoautorizada.html

ErrorDocument 403 / paginaproibida.html

ErrorDocument 404 / pagina404.html

If we want to see the visitors forwarded to the main page of our site, we could insert the following code:

ErrorDocument 404 / index.php

As you can see, is nothing difficult. In any case this is the easiest way to make this change, but if someone has something to add can do it.

Jogos para 2

Jogos do ben ten

Comments

No comments yet.

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    • No HTML is allowed in comments, but URLs will be hyperlinked
    • Comments are not for promoting your Hubs or other sites

    Please wait working