Safe Redirect Manager

Descrição

Gerencie de forma fácil e segura os redirecionamentos do seu site, do jeito do WordPress. Existem muitos plugins de redirecionamento disponíveis. A maioria deles armazena os redirecionamentos na tabela de opções ou em tabelas personalizadas. A maioria deles oferece dezenas de opções desnecessárias. Alguns deles têm sérios problemas de desempenho, como registro de todos os erros 404. O Safe Redirect Manager armazena seus redirecionamentos como um tipo de post personalizado. Isso facilita a exportação e importação de seus dados e torna seu site escalável. O Safe Redirect Manager é desenvolvido para lidar com níveis empresariais de tráfego e é usado em grandes sites de notícias. O plugin vem só com o que você precisa, seguindo o mantra do WordPress, “decisões, não opções”. Ações e filtros tornam o plugin muito extensível.

Crie um fork do plugin no GitHub.

Configuração

Não existem configurações complexas para este plugin. Para gerenciar redirecionamentos, navegue até o painel administrativo (“Ferramentas” > “Safe Redirect Manager”).

Cada redirecionamento contém alguns poucos campos que você pode usar:

“Redirecionar de”

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.

“Redirecionar para”

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.

“Código de status HTTP”

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).

Observação:

  • 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.
  • Por padrão, “Redirecionar de” e caminhos solicitados não diferenciam maiúsculas e minúsculas.
  • 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.

Instalação

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”).

Avaliações

9 agosto, 2020 1 resposta
There are lots of redirect plugins available but this is the only one that I recommend and have it installed on all of my sites. Simple to use and, well, it just works - you can't ask for anything more.
16 abril, 2020 1 resposta
After trying several other redirection plugins this one finally works. The others did nothing.
Leia todas as 73 avaliações

Colaboradores e desenvolvedores

“Safe Redirect Manager” é um software com código aberto. As seguintes pessoas contribuíram para este plugin.

Colaboradores

“Safe Redirect Manager” foi traduzido para 7 localizações. Agradecemos aos tradutores por suas contribuições.

Traduzir “Safe Redirect Manager” para o seu idioma.

Interessado no desenvolvimento?

Navegue pelo código, dê uma olhada no repositório SVN ou assine o registro de desenvolvimento via RSS.

Registro de alterações

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.