Custom 404 Page by Siropu

Custom 404 Page by Siropu 1.1.7

No permission to download
@Siropu

When an admin adds a redirection link for a 404 link in admin.php?404-not-found/, where are those redirection links stored and how can I edit them?

Found it. I never noticed the "with redirect" tab on that page.
 
Last edited:
you get a two tabbed user interface to manage links. one show your existing 404 pages. the second shows you the redirect links. there is a search box to search for entries based on link or ip. you can also mass edit bulk links. interface is slightly cluttered though because referrer is more or less empty in all cases. ip column for me mostly consists of bots. but it does the job of creating redirects which would otherwise require you to constantly add in the server config files. any popular link you might have managed to break due to a mistake like while merging threads etc... can be redirected easily here. in a way, this is an addon that you would want to start using asap.

that said, i am currently facing a weird issue. facebook bot has been hitting me badly with really really old links which have not existed for a long time. fixing them is pointless because they do not really exist outside some facebook database because i deleted my account which took the facebook page for the site which might have had all these links from over the years. i am now waiting for the bot to disappear before i start focusing on fixing old links that actually exist outside my control!
 
i had like ability to clean up entries from partial entries. facebook has been hitting me with historic links that have not existed for years but probably was shared there years ago. no idea why it's happening but today is the third day. all facebook ips end up in face:b00c (example ip: 2a03:2880:11ff:1::face:b00c). it might already be supported but i can't tell how to get rid of these entries!
 
@Siropu I'm getting an error message when looking at the '404 not found' page in the admincp:


Code:
XF\Db\Exception: MySQL fetch error [2014]: Commands out of sync; you can't run this command now in src/XF/Db/AbstractStatement.php at line 228

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 134
    XF\Db\Mysqli\Statement->fetchRowValues() in src/XF/Db/AbstractStatement.php at line 93
    XF\Db\AbstractStatement->fetchAliasGrouped() in src/XF/Mvc/Entity/Finder.php at line 1381
    XF\Mvc\Entity\Finder->fetch() in src/addons/Siropu/Custom404Page/Admin/Controller/NotFound.php at line 127
    Siropu\Custom404Page\Admin\Controller\NotFound->actionIndex() in src/XF/Mvc/Dispatcher.php at line 350
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2300
    XF\App->run() in src/XF.php at line 488
    XF::runApp() in admin.php at line 13

I'm not sure what to do about it. Can you point me in the right direction?
 
I have like 8000 items "mydomain/search/some_number/".
What are those? Where do they come from? How to fix them?
Thanks in advance.
 
You would have to ignore them. They are temporarily cached search results from my understanding. At best I suppose you can do a regex redirect to unified page.
 
You would have to ignore them. They are temporarily cached search results from my understanding. At best I suppose you can do a regex redirect to unified page.
I also see those in Settings > Crawl stats > Crawl requests: Not found (404) in Google Search Console, so I would rather choose to fix them than to ignore them. )
Could you please explain how to do that regex redirect?
 
Best to block indexing of these urls through robots file. These links do not exist anywhere. Some members might end up posting them in posts. But Google has no business accessing them.

https://xenforo.com/community/search/3577132/?q=Apple&o=relevance
 
Best to block indexing of these urls through robots file. These links do not exist anywhere. Some members might end up posting them in posts. But Google has no business accessing them.

https://xenforo.com/community/search/3577132/?q=Apple&o=relevance

ok. just have added into robot.txt

Code:
Allow: /search/$
Disallow: /search/*

so I guess to get rid of already indexed by Google and listed under 404, I should create a redirect for /search/* to say /search/.
what would be the code and where to put it?
 
so I guess to get rid of already indexed by Google and listed under 404, I should create a redirect for /search/* to say /search/.
what would be the code and where to put it?
Don't bother. With the robots.txt change they will eventually drop out of the index without any additional action on your part. Indeed, all 404s will drop out eventually. Google attempts to recrawl those for a while just in case it was a temporary anomaly with your server but that is the whole point of 404s: to tell visitors and search engines that the page no longer exists at that URL.
 
Last edited:
Also do not redirect /search/* using htaccess route! If you do want to create them, create in this addon because otherwise your search would stop working as all new searches would also get redirected. It is just not a good idea as @djbaxter stated.
 
read through the thread... there are some examples posted. it sort of requires regex i believe. and i have always struggled with it. one of the examples is here:

 
Top Bottom