Custom 404 Page by Siropu

Custom 404 Page by Siropu 1.1.7

No permission to download
here's a few more common ones that i'm seeing and rules i've used to fix. Some of these may be from IB or even vb or vbseo, so check that you actually need it before using it.

a few misses here from xf in the upgrade path/changed urls. glad this tool is exposing it.


Media albums order has moved:
Code:
/(.*)\/media\/users\/(.*)\.(\d+)\/albums/
$1/media/albums/users/$2.$3/

latest activity seems to have been renamed at some point from recent-activity:
Code:
/(.*)\/members\/(.*)\.(\d+)\/recent\-activity/
$1/members/$2.$3/latest-activity

smilies (i think this is from ipb days or vb)

Code:
/(.*)\/images\/smilies\/(.*)\.(.*)/
$1/styles/default/xenforo/smilies/$2.$3
and of course replace xenforo with your theme name if you are using a custom one


likes became reactions --

Code:
/(.*)\/posts\/(\d+)\/likes/
$1/posts/$2/reactions


old attachments from an old format, maybe vbseo?

Code:
/(.*)\/attachments\/(.*)\-(.*)\.(?:jpg|gif|png)/
$1/files/404.jpg
 
Last edited:
Also, I'm finding old items that were in folders (that no longer exist) hit the server 404 instead of the xf 'pretty' 404 page.

eg,

mydomain.com <- my board
mydomain.com/articles/view.php?id=123 <- hits server 404


I assume i need to direct /articles to Xf through htaccess but i sort of assumed it would already be doing that based on the 'not a directory' statement.
thoughts?
figured this out too. not related to this mod or Xf.

I had moved my htaccess contents into httpd.conf include to improve performance, but i only made an ssl variant include on 443 directory listener as i don't use http any more. However, the above 404's were not getting redirected like they shoiuld as it fails before ever movign to https where the site listens.

i restored the htaccess file in my root dir as a work around to redirect to https site which then in fact triggers the xf 404.
 
Hi Siropu, I have seen that the voice "Referrer" and "IP User" are all signed as N.D is something it succeed only to me?

And also this fields as "Referrer", "IP User", etc. will be good that clicking on this voices it list the values, so that for example clicking on "IP User" it list all the access with same ip's, etc...
 
Wow. This addon is excellent. Seems to work fine on 2.2b5. Queries!
  • What redirect rule to use to redirect post urls on dead threads to parent forum.
  • What redirect rule to use to redirect dead post urls on active threads to thread.
  • Has anyone managed to find a way to show the similar threads widget on the 404 page based on keywords in the URL? 😋
Sadly, I would very likely end up removing this addon in coming days. It is just too attention grabbing. You just want to fix all broken links. And it is kind of a futile exercise on a forum that has been online for 16 years and has gone through 4 platform migrations!

Thanks for this solid addon @Siropu. Big fan of your addons.
 
It seems to be working fine with the 2.2 betas so far. Did you run into a particular problem with it that you want others to check? 🤔
I don't know, I feel pretty stupid right now. I had this addon working on my other website, which I since took down. Now I'm trying to install it on my new project running 2.2 Beta 5, and I can't seem to get it to work. It's like I'm missing a step. It logs 404 pages just fine, but I can't get the actual addon 404 page to come up when a non-existent url is being used.
 
but I can't get the actual addon 404 page to come up when a non-existent url is being used.
What page are you trying to get it to display? By default it'll display the results of the template contents in the options /admin.php?add-ons/Siropu-Custom404Page/options.
 
  • What redirect rule to use to redirect post urls on dead threads to parent forum.
  • What redirect rule to use to redirect dead post urls on active threads to thread.
If a thread or post doesn't exist anymore, there is no way to determine where it was posted. This could be done if there was a deletion log pointing to the source. That way you could grab the ID from the URL and find out where it was posted.
 
no no... i do not want to automate the whole process. i just want to set one redirect rule that would take care of all dead post urls for each thread.

for example... one redirect rule for all dead posts in existing thread like:

https://forum.com/threads/live-thread.threadid/post-1
https://forum.com/threads/live-thread.threadid/post-2
https://forum.com/threads/live-thread.threadid/post-3

to https://forum.com/threads/live-thread.threadid/

and one redirect rule for all dead posts in dead thread link:

https://forum.com/threads/dead-thread.threadid/post-1
https://forum.com/threads/dead-thread.threadid/post-2
https://forum.com/threads/dead-thread.threadid/post-3

to parent forum https://forum.com/forums/forum-id/

the post links are not supposed to be indexed by google, but they end up getting indexed. and of course they are also shared manually so there's that.
 
What page are you trying to get it to display? By default it'll display the results of the template contents in the options /admin.php?add-ons/Siropu-Custom404Page/options.
This is the page I'm want it to display, but when an improper URL is being entered, there is no redirect to that page represented by this template: SIROPU_CUSTOM_404_PAGE_CONTAINER.
 
Top Bottom