Safe Redirect Manager

外掛說明

Easily and safely manage your site’s redirects the WordPress way. There are many redirect plugins available. Most of them store redirects in the options table or in custom tables. Most of them provide tons of unnecessary options. Some of them have serious performance implications (404 error logging). Safe Redirect Manager stores redirects as Custom Post Types. This makes your data portable and your website scalable. Safe Redirect Manager is built to handle enterprise level traffic and is used on major publishing websites. The plugin comes with only what you need following the WordPress mantra, decisions not options. Actions and filters make the plugin very extensible.

Fork the plugin on GitHub.

Configuration

There are no overarching settings for this plugin. To manage redirects, navigate to the administration panel (“Tools” > “Safe Redirect Manager”).

Each redirect contains a few fields that you can utilize:

“Redirect From”

This should be a path relative to the root of your WordPress installation. When someone visits your site with a path that matches this one, a redirect will occur. If your site is located at http://example.com/wp/ and you wanted to redirect http://example.com/wp/about to http://example.com, your “Redirect From” would be /about.

Clicking the “Enable Regex” checkbox allows you to use regular expressions in your path. There are many great tutorials on regular expressions.

You can also use wildcards in your “Redirect From” paths. By adding an * at the end of a URL, your redirect will match any request that starts with your “Redirect From”. Wildcards support replacements. This means if you have a wildcard in your from path that matches a string, you can have that string replace a wildcard character in your “Redirect To” path. For example, if your “Redirect From” is /test/*, your “Redirect To” is http://google.com/*, and the requested path is /test/string, the user would be redirect to http://google.com/string.

“Redirect To”

This should be a path (i.e. /test) or a URL (i.e. http://example.com/wp/test). If a requested path matches “Redirect From”, they will be redirected here. “Redirect To” supports wildcard and regular expression replacements.

“HTTP Status Code”

HTTP status codes are numbers that contain information about a request (i.e. whether it was successful, unauthorized, not found, etc). You should almost always use either 302 (temporarily moved) or 301 (permanently moved).

Note:

  • Redirects are cached using the Transients API. Cache busts occur when redirects are added, updated, and deleted so you shouldn’t be serving stale redirects.
  • By default the plugin only allows at most 1000 redirects to prevent performance issues. There is a filter srm_max_redirects that you can utilize to up this number.
  • “Redirect From” and requested paths are case insensitive by default.
  • Developers can use srm_additional_status_codes filter to add status codes if needed.
  • Rules set with 403 and 410 status codes are handled by applying the HTTP status code and render the default WordPress wp_die screen with an optional message.
  • Rules set with a 404 status code will apply the status code and render the 404 template.

安裝方式

Install the plugin in WordPress. You can download a zip via GitHub and upload it using the WordPress plugin uploader (“Plugins” > “Add New” > “Upload Plugin”).

使用者評論

2024 年 3 月 7 日 5 則留言
Perdón. Ha sido un error por mi parte. Sí aparece en la lista de plugins, solo que como aparecía con el nombre en español: “Administrador de redirecciones seguras” no lo encontraba en la lista por “Safe Redirection Manager”. Disculpas de nuevo.
2024 年 1 月 5 日 1 則留言
Excellent for those who are not familiar with URL redirections in .htaccess
2023 年 12 月 21 日 1 則留言
Simplesmente não funciona. Embora tenha o aviso que tem conflito com o All In one SEO, o AIO tem a ferramenta de redirecionamento somente na versão PRO, e é desativada na versão gratuíta (que eu uso). Porém, mesmo assim, instalando o Safe Redirect Manager não é criado o menu “Ferramentas” > “Safe Redirect Manager”, e portanto simplesmente não tem como acessar a página de configuração do plugin.
2023 年 12 月 8 日 1 則留言
Working ok with your basic language- but not with your sup language. So useless if you use WPML
閱讀全部 77 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Safe Redirect Manager〉的開發相關工作。

參與者

〈Safe Redirect Manager〉外掛目前已有 7 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Safe Redirect Manager〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.1.1 – 2024-01-08

2.1.0 – 2023-09-07

2.0.1 – 2023-06-01

2.0.0 – 2023-05-31

Note that this version bumps the PHP minimum from 5.6 to 7.4 and the WordPress minimum from 4.6 to 5.7.

Earlier versions

For the changelog of earlier versions, please refer to the changelog on github.com.