Linux 软件免费装

khrlzhfr Simple CSV Redirects with Cloudflare

开发者 khrlzhfr
更新时间 2026年11月28日 15:27
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

redirect 301 redirects csv cloudflare

下载

1.3.0 1.2.0

详情介绍:

khrlzhfr Simple CSV Redirects with Cloudflare gives you two ways to manage redirects from one screen under Tools → Redirects: Every change is recorded in a Change log with who made it, when, and the before and after values. CSV Rules Cloudflare Rules Add a Cloudflare API token and your domains to wp-config.php and a Cloudflare Rules tab appears, where you can add, edit, reorder, enable, disable and delete Single Redirect rules. The screen shows how many rules each domain's plan allows. Who can use it Administrators and editors by default. You can change the roles per site in wp-config.php.

安装:

  1. Install and activate the plugin.
  2. Go to Tools → Redirects. CSV Rules work straight away.
  3. Optional: to manage Cloudflare rules, follow the steps on the Setup tab to create a Cloudflare API token and add it to wp-config.php:
define( 'RFCF_CONFIG', [ 'token' => 'cfut_your-api-token', 'domains' => [ 'example.com' ], ] );

升级注意事项:

1.3.0 CSV rules can be imported from a URL, such as a Google Sheet. 1.2.0 New name and folder. Install this version first, then delete the old copy; your settings and data are kept. 1.1.3 Fixes where the query string goes when a CSV redirect target has a #fragment, and tidies the Setup tab. 1.1.0 New name and plugin folder. Download your CSV before deleting the old copy.

常见问题:

What CSV columns can I use?

description, source, target, status, preserve_query_string, enabled. Only source and target are required. Use the Setup tab or download the template for an example.

Can I keep the rules in a Google Sheet?

Yes. Share the sheet so anyone with the link can view it, paste its link under Import from URL on the CSV Rules tab and select Import. The tab in the link is used. Import again whenever you change the sheet; the address is remembered. Rows are checked first, and if any row has a problem nothing changes.

Do CSV rules work on cached pages?

No. CSV rules run inside WordPress, so they don't apply to pages served from a page cache or to files such as PDFs. Use Cloudflare Rules for those.

Does it work on multisite?

Yes. Each site has its own CSV file and change log. In wp-config.php, top-level settings apply to every site, and an entry keyed by site ID overrides them for that site.

What permissions does the Cloudflare token need?

Zone → Single Redirect → Edit, and Zone → Zone → Read, limited to the domains the site should manage.

更新日志:

1.3.0 1.2.0 1.1.3 1.1.2 1.1.1 1.1.0 1.0.2 1.0.1 1.0.0