Custom 404 Page by Siropu

Custom 404 Page by Siropu 1.1.7

No permission to download
Thanks sounds useful, but what is access_ssl_log? (Sorry I am abut ignorant)
That IS usefull and the only way to stop traffic like this
If you don't know anything about your access_ssl_log, your on managed hosting?
Then your Hoster should config this for you.

Some other uselull tricks abaout 410 redirecting... (btw...)
 
Siropu updated Custom 404 Page by Siropu with a new update entry:

New Features & Improvements

Added "Referrer" field to display the URLs that linked to the 404 page.
Added option to search entries by URL or Redirect URL.
Added tabs to filter by links with or without redirects.
Added option to order by Entry date, Last view date and View count in both ascending and descending order.
Added admin option to add redirects using Regular Expressions.
Made some CSS adjustments to make longer links fit.

P.S. For those who want to donate, I have added a donation link in the resource description.

Read the rest of this update entry...
 
Getting errors in error log after upgrade:
Server error log
  • ErrorException: [E_WARNING] Invalid argument supplied for foreach()
  • src/addons/Siropu/Custom404Page/Listener.php:18
  • Generated by: Unknown account
  • May 27, 2019 at 8:56 PM
Stack trace
#0 src/addons/Siropu/Custom404Page/Listener.php(18): XF::handlePhpError(2, '[E_WARNING] Inv...', '/home/joyfreak/...', 18, Array)
#1 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#2 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#3 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#4 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#5 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#6 src/XF.php(390): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
Request state
array(4) {
["url"] => string(33) "/streams/4/tmsean/27929699/popout"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Server error log
  • ErrorException: [E_NOTICE] Undefined index: siropuCustom404PageRegexRedirects
  • src/addons/Siropu/Custom404Page/Listener.php:18
  • Generated by: Unknown account
  • May 27, 2019 at 8:56 PM
Stack trace
#0 src/addons/Siropu/Custom404Page/Listener.php(18): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/joyfreak/...', 18, Array)
#1 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#2 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#3 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#4 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#5 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#6 src/XF.php(390): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
Request state
array(4) {
["url"] => string(33) "/streams/4/tmsean/27929699/popout"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Omg, really!? I lost all my custom work after upgrade! Fuming!

Edit: False alarm! It was displaying the default 404 but when I went into options to see if my custom work was still there and it was. I went on to save it and it worked. Maybe something can be done to avoid this so others don't get confused?
 
Why a searchbox, thats old content. We give that page to a 404...
The searchbox is also a 404. When a search bot hits it, it sees it as 404.
When a user hits it, they probably clicked some old link. They will most likely leave your site hitting the back button as they didn't find what they expected.
In an effort to keep the user, you can try to present some suggestions/alternatives or a search.
A user will never report a broken link, they simply don't care.. at least that is my experience running a forum for 10+ years.

Personal preference, good job your not a member then
Hmmm, you could use some ;)
 
@Siropu thanks for adding referrer

however they are all showing as N/A? Do you know what Gould be the reason?

(These are the ones I mentioned above post 32, thousand that all seem to be connected to /ratings/ ???
 
(These are the ones I mentioned above post 32, thousand that all seem to be connected to /ratings/ ???

I believe that the Ratings 404s and other odd link combinations are related to misbehaving bots. There’s not much you can do other than banning them.

I also have nothing but N/As in my referrers.
 
I believe that the Ratings 404s and other odd link combinations are related to misbehaving bots. There’s not much you can do other than banning them.
That means that the referrer was not available when the 404 page was accessed. It is probably generated by a bot.


Yes this makes sense, but sadly if I cannot find what is causing them to find so many dead links, it totally swamps the log (2700 in 24 hours) and so renders the add-on not as useful as I'd hoped finding "legit" dead links.

Perhaps I could do a wildcard htaccess redirect for /rating/, but I'd be concerned it screws something else up.

Code:
<IfModule mod_rewrite.c>
RewriteRule ^(.*)rating/list(.*)$ https://example.com/ [R=301,L]
</IfModule>
 
Last edited:
Great update @Siropu, thanks for this. The new referrer functionality is working fine for me:
View attachment 203347

I have one request: Possibility to exclude certain URLs (with wildcards)
In my case I want to exclude hundreds of these kind of URLs: https://site.com/search/*

This is similar to my post above.

The wildcard redirect I posted will work in .htaccess

Code:
<IfModule mod_rewrite.c>
RewriteRule ^(.*)search(.*)$ https://example.com/ [R=301,L]
</IfModule>

But there is a big problem with a wildcard with /search/because that is a part of a legitimate URL (for the search page)
 
Last edited:
Great update @Siropu, thanks for this. The new referrer functionality is working fine for me:
View attachment 203347

I have one request: Possibility to exclude certain URLs (with wildcards)
In my case I want to exclude hundreds of these kind of URLs: https://site.com/search/*
I actually have a similar request: filter out certain urls. Just like the filter to only see specific urls; have a filter that excludes specific urls.

As many dead links are caused by malicious bots, it would be useful to see the IP address and user name. This way we can also easily see if its all the same bot.
 
Top Bottom