Navigation

Pligg Support

Hi, i want to remove 404 error page. Suppose if any page could not be found then it will not show 404 error page, it will just go back to index page.

Could anyone please help me how do i do it?

Possible Answers

    If you want to instantly redirect 404 page to your index page, remove everything (the code) in error_404.php and having only this code appear in that file:

    header("Location: $my_pligg_base/index.php");

    | Posted 309 days ago | Permalink | Hide Replies

    This code is not working, just showing the code in 404error page, see the link below:

    http://www.backlinkslive.info/404error.php

    | Posted 309 days ago | Permalink | Hide Replies

    You should enclose it with the PHP tags and the filename should error_404.php, NOT 404error.php.

    The full code of error_404.php should be this one: http://codepen.io/anon/pen/ICqik

    | Posted 309 days ago | Permalink | Hide Replies

    Thank you very much, this method works great than my previous method. I am happy with that, really great.

    Actually i need to do this to reduce crawler error from google adsense. Every time when visitors come to 404 page then google giving me a crawler error report.

    So if i can show google that there is no 404 error page then they will not show any crawler error.

    My last question to you:

    Is redirecting from 404 page to index page (this method) destructive for my website or could it lead my website to ban from google search?

    | Posted 309 days ago | Permalink | Hide Replies

    I'd keep the 404 page just to let the visitor know there was a problem and put a link there pointing back to the index.html or php. You can also put a meta redirect in the header to redirect the visitor after a short time. Or immediately if you'd like.

    | Posted 310 days ago | Permalink | Hide Replies

    Hi, Pedro , I think I have the same problem with adsense , I changed permarlinks settings from day and name to post name. And now I'm receving a lot of crawl error by google adsense. If i do the same as you do you think the problem with bee risolved. And haw can i change 404error.php page. Where can I found it. Sorry for my bad english and thank you.

    | Posted 299 days ago | Permalink | Hide Replies

    I have solved it but let me know one more thing:

    Q. Is redirecting from 404 page to index page destructive for my website or could it lead my website to ban from google search?

    | Posted 309 days ago | Permalink | Hide Replies

    I'll stand by my original answer. Do things as other systems expect and in a way that provides feedback to you and your visitors.

    a 404 error tells you and everyone else something went wrong. When a 404 occurs you should be actively seeking 'the why' and then fixing that. Patching things to ignore errors completely just leaves everyone hanging with unanswered questions. And visitors come to websites for answers.

    | Posted 309 days ago | Permalink | Hide Replies

    I understand your word but the main problem is that if i keep 404error page, every time when visitors come to 404 page then google giving me a crawler error report.

    So if i can show google that there is no 404 error page then they will not show any crawler error.

    I hope you will understand that.

    | Posted 309 days ago | Permalink | Hide Replies

    You might ask yourself this, "Am I running a website to keep Google Happy? Or am I running a website to fulfill the needs of my visitors, give them cause to return often and maybe turn a profit from their activities within my website?".

    I can't answer that one for you! But the short term answer seems to me to be, "Kill the 404s".

    But I don't take 'quick and easy' or 'short-term answers'. I'm in this for the long haul. Your reasons may tell you differently. That's okay as what suites or works for you doesn't have to match my thoughts or results.

    I just want to guide you to a good answer!

    | Posted 309 days ago | Permalink | Hide Replies

    Finally i solved this problem, what i have done:

    1. Copied index.php content and pasted all the content to 404error.php page.

    2. Placed a little bit code at the beginning og 404error.php page that is:

    window.location.href = "index.php"

    Now it is redirecting instantly to index page if they don't find any page.

    I need to know one more thing that is:

    Q. Is the above method is destructive for my website or could it lead my website to ban from google?

    My website is: backlinkslive.info

    | Posted 310 days ago | Permalink | Hide Replies

    faria18000 Sorry, i supposed you are using Pligg 2.0. That the reason my be not work my index.php.

    My site http://www.alternativasocial.net/

    | Posted 310 days ago | Permalink | Hide Replies

    Pedro aka, i have used your method, but here is another problem that is, 404error.php is still showing. I want that 404error.php page will move instantly to index page.

    | Posted 310 days ago | Permalink | Hide Replies

    Please, send me your site url

    | Posted 310 days ago | Permalink | Hide Replies

    Thanks for your answers.

    Actually i am getting a lots of crawler error report to my adsense and i found the main reason is 404 error page. If it is not showing any error page then the crawler error report will be solved.

    I have one more question:

    * If i redirect all the 404 error page to index page, will it lead my website to ban from google?

    | Posted 310 days ago | Permalink | Hide Replies

    Hi,

    .htaccess is not my speciality but i have like we said in Spain, a "chapuza". Change your error_404.php for the attached. Is just a renamed index.php.

    | Posted 310 days ago | Permalink | Hide Replies

Who Upvoted this Story

Pligg.com's Support area is where you can ask questions and get answers. Just getting started with the Support area? This section describes tips for participating.

Submitting a Question or Comment

By taking a minute to research previous posts you may receive an answer much faster than waiting for a response to a new question. Begin by searching the support section for an answer. Sometimes you may even want to extend your search to the entire pligg.com domain.

If you are unable to find a relevant answer, submit a new question or comment here. Please provide a detailed description and, when necessary, debugging information such as your server environment (a link to a <?php phypinfo(); ?> .php page would be very helpful), your web browser, and any steps necessary to reproduce your issue.

Submitting an Answer

If you have an answer or useful response that you would like to add to a post, you can submit it as a comment which other users will then vote on. Answers are sorted by most popular to least, allowing the best information to climb to the top of the page.

Please read and vote for existing answers before submitting your own, as there may already be an acceptable answer provided. You can use the "Reply" link found within an answer to submit a response to it, in case you want to expand or comment on someone else's contribution.

Including Files or Code

Sometimes it is necessary for you to attach a file or include a snippet of code for others to reference in your response. In most cases, you can .zip up files and attach them to a question or answer using Pligg's file manager. At times though this may fail, and in these circumstances we recommend using a third party host. Below we are including a list of recommended websites where you can share easily share file uploads (or snippets of code) through the web.