[wordpress插件] Custom Error Pages自定义错误页面

wordpress 插件 文章 2020-04-08 01:01 802 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

WordPress offers inbuilt support for custom 404 pages on all themes.

WordPress对所有主题的自定义404页面提供内置支持。

But what about custom pages for other common errors like 401 and 403?

但是,针对其他常见错误(例如401和403)的自定义页面呢?

You end up seeing a bland error page of the Web Server.

您最终看到Web服务器的乏味错误页面。

With this plugin you can easily create custom 401 and 403 error pages with any theme without writing a single line of code!!!

使用此插件,您可以轻松创建具有任何主题的自定义401和403错误页面,而无需编写任何代码!

And the best part is that you set it and forget it.

最好的部分是您设置它并忘记它。

Yes, you don’t have to do any changes even if you change themes.

是的,即使您更改主题也无需做任何更改。

The heading and text you want on 401 and 403 error pages are displayed on the currently active theme.

您要在401和403错误页面上显示的标题和文本会显示在当前活动的主题上。

Further Reading

进一步阅读

安装步骤

    1. Install and activate the custom error pages plugin.
    2. 安装并激活自定义错误页面插件。

    3. From the wp-admin go to Settings > Custom Error Pages, fill in the heading and content boxes, save the changes and preview it.
    4. wp-admin 转到“设置”>“自定义错误页面” ,填写标题和内容框,保存更改并预览。

    5. Configure your web server to use a custom error page.
    6. 配置您的Web服务器以使用自定义错误页面。

    Apache users edit your .htaccess file and add the following lines.

    Apache用户编辑您的 .htaccess 文件并添加以下行。

    ErrorDocument 403 /index.php?status=403

      ErrorDocument 403 /index.php?status=403

    ErrorDocument 401 /index.php?status=401

    ErrorDocument 401 /index.php?status=401

    Nginx users edit your nginx.conf file and add the following lines.

    Nginx用户编辑您的 nginx.conf 文件并添加以下行。

    error_page  403 = /index.php?status=403

      error_page 403 = /index.php?status=403

    error_page 401 = /index.php?status=401

    error_page 401 = /index.php?status=401

    Try accessing a file or directory which is forbidden like

    尝试访问禁止的文件或目录,例如

    http://www.example.com/.htaccess

    http://www.example.com/.htaccess

    http://www.example.com/wp-includes/

    http://www.example.com/wp-includes/

    Did you see a custom 403 page in all the glory of your theme?

    您是否在主题的所有荣耀中都看到了自定义的403页面?

下载地址
https://downloads.wordpress.org/plugin/custom-error-pages.1.1.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Category Extra类别额外
[wordpress插件] Category Excluder from Theme CustomizerTheme Customizer中的类别排除程序
[wordpress插件] Elementor CPT Magic ToolElementor CPT魔术工具
[wordpress插件] DomainTools Whois PluginDomainTools Whois插件
[wordpress插件] Awesome Visitor Counter很棒的访客柜台
随便看看
微信公众号免300认证教程 5050
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4367
小程序广告组件通过审核,但是小程序内没有显示广告? 4341
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8259
问题? 7475
如何快速搭建抽奖助手小程序(无需代码知识) 5154
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6211
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5725
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5296
如何解决渲染层网络错误Failed to load media? 16645