Custom 404 Page by Siropu

Custom 404 Page by Siropu 1.1.7

No permission to download
Anyone else having their misc/contact come up a ton? I have the contact link twice on every page that loads in an overlay and they both work just fine.
 
Last edited:
Looks like the new bulk delete option might be conflicting with the trashcan icon modal; when clicking on the trashcan to delete the individual entry there are no buttons to confirm the action....
View attachment 203708
If you check the box you can also delete individual links. Thus, the selection with the paper basket icon is superfluous...
 
Hello @Siropu is this addon safe to use on large forums?

i have over 3500 items showing up in the list after i installed the addon
When I started with the addon, I had more than 30,000 entries in the list. I was able to reroute about 18,000 with a RegEx because those were old entries from vBSEO times. Then some old links in posts that pointed to deleted posting etc. Meanwhile, the forum is almost "clean" in terms of 404s.

BTW. Our forum has about 2 million postings. Is that big enough? ;)
 
Looks like the new bulk delete option might be conflicting with the trashcan icon modal; when clicking on the trashcan to delete the individual entry there are no buttons to confirm the action....

Same thing with the add redirect. No way to confirm the actions.
 
Care to share? :)
Sure, something like this...

Code:
<xf:title>{{ phrase('siropu_custom_404_page_title') }}</xf:title>
<xf:h1 hidden="true" />
<div class="block">
    <div class="block-container">
        <h3 class="block-header">{{ phrase('siropu_custom_404_page_title') }}</h3>
        <div class="block-body block-row">
            {{ phrase('siropu_custom_404_page_requested_page_could_not_be_found') }}
        </div>
        <div style="width:50%;margin:auto;">
            <form action="{{ link('search/search') }}" method="post"
                class="menu-content" style="border:3px solid #47a7eb;"
                data-xf-init="quick-search">
                <div class="menu-row">
                    <xf:textbox name="keywords"
                        placeholder="{{ phrase('search...') }}"
                        aria-label="{{ phrase('search') }}"
                        data-menu-autofocus="true" />
                </div>
                <div class="menu-footer">
                    <span class="menu-footer-controls">
                        <xf:button type="submit" class="button--primary" icon="search" />                                        
                    </span>
                </div>
                <xf:csrf />
            </form>
        </div>
        <br /><br />
    </div>
</div>
 
Sure, something like this...

Code:
<xf:title>{{ phrase('siropu_custom_404_page_title') }}</xf:title>
<xf:h1 hidden="true" />
<div class="block">
    <div class="block-container">
        <h3 class="block-header">{{ phrase('siropu_custom_404_page_title') }}</h3>
        <div class="block-body block-row">
            {{ phrase('siropu_custom_404_page_requested_page_could_not_be_found') }}
        </div>
        <div style="width:50%;margin:auto;">
            <form action="{{ link('search/search') }}" method="post"
                class="menu-content" style="border:3px solid #47a7eb;"
                data-xf-init="quick-search">
                <div class="menu-row">
                    <xf:textbox name="keywords"
                        placeholder="{{ phrase('search...') }}"
                        aria-label="{{ phrase('search') }}"
                        data-menu-autofocus="true" />
                </div>
                <div class="menu-footer">
                    <span class="menu-footer-controls">
                        <xf:button type="submit" class="button--primary" icon="search" />                                       
                    </span>
                </div>
                <xf:csrf />
            </form>
        </div>
        <br /><br />
    </div>
</div>

Works perfect, thanks for that. :)
 
Can anyone share their regex's? Just so we can all get a sense of how to use it best with this addon.

Also, what about ignored URLs? So far I put http://example.com/* because my site is https. I don't know if that's correct, I'll check the logs later.
 
I made my own google compliant 404 page. There is also a link to the forum search under other recommended links.
So I just have to make an Add. in the code of the addon. https://xenforo.com/community/threads/custom-404-page-by-siropu.165650/post-1352100
...Or you can paste the entire code (<meta http-equiv="refresh" content="0; URL=https://your.tld/your-custom-error-pages/YourCustom404.html">) in the SIROPU_CUSTOM_404_PAGE_CONTAINER template directly and check the admin option "Display content only".

So it does also not matter if someone searches http://.. or https://...

 
Last edited:
Can anyone share their regex's? Just so we can all get a sense of how to use it best with this addon.
What kind of regex are you trying to do? The regex would come into play if you want to redirect certain URL patterns to a different URL insteading of showing them the 404 error page. You don't need to enter anything unless you're trying to do automatica redirects.
Also, what about ignored URLs? So far I put http://example.com/* because my site is https. I don't know if that's correct, I'll check the logs later.
Do you have your .htaccess (or other config) redirecting your http traffic to https? If so, you shouldn't be those requests as 404s then. With XF 2 the "canonical URL" should also take care of it but I personally prefer doing it in .htaccess.
 
What kind of regex are you trying to do? The regex would come into play if you want to redirect certain URL patterns to a different URL insteading of showing them the 404 error page. You don't need to enter anything unless you're trying to do automatica redirects.
Do you have your .htaccess (or other config) redirecting your http traffic to https? If so, you shouldn't be those requests as 404s then. With XF 2 the "canonical URL" should also take care of it but I personally prefer doing it in .htaccess.
Yeah I have the htaccess redirect already setup for http to https, it's the issue of not having those show up in this addon, that's all.

For regex I get stuff like http://example.com/wp/wp-admin/index.php which doesn't exist, but I'm seeing it often. So for that I'd like to either not have it show up in this addon, or redirect it to just somewhere else.
 
Yeah I have the htaccess redirect already setup for http to https, it's the issue of not having those show up in this addon, that's all.

For regex I get stuff like http://example.com/wp/wp-admin/index.php which doesn't exist, but I'm seeing it often. So for that I'd like to either not have it show up in this addon, or redirect it to just somewhere else.
Assuming that /wp/ is not a valid route for you, try something like this in this addon...
Regex: /(.*)\/wp\/(.*)/
Replancement: $1

Be sure to test it of course but the end result should be any attempts at going to http://example.com/wp/{anything} should get redirected automatically to http://example.com instead.


EDIT: If you have the .htaccess change in place you shouldn't be seeing 404's for "http://example.com".
 
Top Bottom