Linux 软件免费装

Attachment Pages Redirect

开发者 samuelaguilera
更新时间 2022年12月3日 19:23
PHP版本: 5.6 及以上
WordPress版本: 6.1.1
版权: GPLv3
版权网址: 版权信息

标签

redirect 301 302 images attachment

下载

1.0 1.1 1.1.1 1.1.2

详情介绍:

There are three possible scenarios where this plugin does something. In all cases, the attachment page must exists, the plugin will not run for deleted attachments: A) A visitor lands on an attachment page and the parent post is available (not in trash or deleted). A 301 redirect will be issued to redirect the visitor to the parent post. B) A visitor lands on an attachment page and the parent post was already deleted from trash. A 302 redirect is issued to home page (this can be changed to 301 if you want, see FAQ for more details). C) A visitor lands on an attachment page and the parent post is in trash, therefore not available for the visitor. It returns a 404 error code to prevent endless redirection loop in old WP releases and redirecting to trashed/not available posts. There is no options page, simply activate it and will do the job. If you're happy with the plugin please don't forget to give it a good rating, it will motivate me to keep sharing and improving this plugin (and others). 必需条件

安装:

升级注意事项:

1.1
  • Recommended upgrade. Read changelog in WordPress.org for more details.

常见问题:

WordPress is returning a 404 error for my attachment pages, will this plugin help?

No. This plugin needs an existing attachment to work, if you deleted the attachment WordPress will return a 404 for its attachment page and this plugin doesn't support that scenario.

Can I change the HTTP codes used for the redirections?

Since version 1.1 you can do this by adding constants to your wp-config.php file. The example below will switch the redirection codes used by default. define( 'ATTACHMENT_REDIRECT_CODE', '302' ); define( 'ORPHAN_ATTACHMENT_REDIRECT_CODE', '301' ); Use this at your own risk, only if you know what you're doing!! No support will be offered for this.

更新日志:

1.1.2 1.1.1 1.1 1.0