Alguns redirecionamentos do htaccess 301 que não correspondem à regra correta

0

Estou tentando redirecionar alguns links de um site antigo do WordPress para o novo.

Meu arquivo .htaccess:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^press-release-mcp-and-tmr-integrate-to-seize-maritime-communications-opportunities$ http://newurl.com/news/press-release-mcp-and-tmr-integrate-to-seize-maritime-communications-opportunities [L,R=301]
RewriteRule ^press-release-bygger-verdens-storste-4g-nett-offshore$ http://newurl.com/news/press-release-bygger-verdens-storste-4g-nett-offshore [L,R=301]
RewriteRule ^press-release-33-cruise-ships-with-mobile-and-internet-services-from-mcp$ http://newurl.com/news/press-release-33-cruise-ships-with-mobile-and-internet-services-from-mcp [L,R=301]
RewriteRule ^press-release-mcp-to-install-4g-infrastructure-on-norwegian-continental-shelf-with-shell$ http://newurl.com/news/press-release-mcp-to-install-4g-infrastructure-on-norwegian-continental-shelf-with-shell [L,R=301]
RewriteRule ^press-release-returns-to-win-offshore$ http://newurl.com/news/press-release-returns-to-win-offshore [L,R=301]
RewriteRule ^can-it-be-true-that-todays-improvements-in-communication-for-the-offshore-environment-initiate-a-paradigm-shift$ http://newurl.com/news/can-it-be-true-that-todays-improvements-in-communication-for-the-offshore-environment-initiate-a-paradigm-shift [L,R=301]
RewriteRule ^how-mobile-data-roaming-increases-your-mobile-data-traffic$ http://newurl.com/news/how-mobile-data-roaming-increases-your-mobile-data-traffic [L,R=301]
RewriteRule ^why-is-improved-personalized-communication-paramount-for-the-offshore-industry$ http://newurl.com/news/why-is-improved-personalized-communication-paramount-for-the-offshore-industry [L,R=301]
RewriteRule ^why-mobile-data-will-remain-the-most-important-source-of-revenue$ http://newurl.com/news/why-mobile-data-will-remain-the-most-important-source-of-revenue [L,R=301]
RewriteRule ^color-line-extends-contract-with-mcp$ http://newurl.com/news/color-line-extends-contract-with-mcp [L,R=301]
RewriteRule ^author/mcp$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^author/andreas-lutebergetmcp-com$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^author/roar-walderhaugmcp-com$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^archives/press-releases$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^archives/news$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^archives/insights$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^need-for-offshore-speed$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^customers$ http://newurl.com/service-support [L,R=301]
RewriteRule ^about-mcp/travel-smart$ http://newurl.com/service-support [L,R=301]
RewriteRule ^about-mcp/organization$ http://newurl.com/business/about-us/the-team [L,R=301]
RewriteRule ^about-mcp/career$ http://newurl.com/business/about-us/careers [L,R=301]
RewriteRule ^about-mcp$ http://newurl.com/business/about-us [L,R=301]
RewriteRule ^cruise$ http://newurl.com/business/cruise [L,R=301]
RewriteRule ^ferry$ http://newurl.com/business/ferry [L,R=301]
RewriteRule ^fisheries$ http://newurl.com/business/fisheries [L,R=301]
RewriteRule ^solutions$ http://newurl.com [L,R=301]
RewriteRule ^offshore$ http://newurl.com/business/offshore [L,R=301]
RewriteRule ^contact-us$ http://newurl.com/business/about-us/contact [L,R=301]
RewriteRule ^history$ http://newurl.com/business/about-us/history [L,R=301]
RewriteRule ^installations-in-operation$ http://newurl.com/business/about-us/installations-in-operation [L,R=301]
RewriteRule ^mcp-insight$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^newsevents$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^protu_roaming.php$ http://newurl.com/business/about-us/installations-in-operation [L,R=301]
RewriteRule ^coverage.php$ http://newurl.com/business/about-us/installations-in-operation [L,R=301]
RewriteRule ^press-kit$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule (.*) http://newurl.com [L,R=301]

Alguns links antigos são redirecionados corretamente para os novos como a regra especifica (cruzeiro, sobre-mcp, histórico), mas outros são apenas correspondentes à última regra (as primeiras 16 regras; de "press-release-mcp-and -tmr ... "para" arquivos / insights ").

Todos os testadores de htaccess que eu tentei disseram que as regras estão ok ( link , link ) mas quando eu tento com um navegador ou com o curl, eles não fazem isso.

Alguma ideia de como posso corrigir isso?

UPDATE

Aqueles que trabalham:

RewriteRule ^need-for-offshore-speed$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^customers$ http://newurl.com/service-support [L,R=301]
RewriteRule ^about-mcp/travel-smart$ http://newurl.com/service-support [L,R=301]
RewriteRule ^about-mcp/organization$ http://newurl.com/business/about-us/the-team [L,R=301]
RewriteRule ^about-mcp/career$ http://newurl.com/business/about-us/careers [L,R=301]
RewriteRule ^about-mcp$ http://newurl.com/business/about-us [L,R=301]
RewriteRule ^cruise$ http://newurl.com/business/cruise [L,R=301]
RewriteRule ^ferry$ http://newurl.com/business/ferry [L,R=301]
RewriteRule ^fisheries$ http://newurl.com/business/fisheries [L,R=301]
RewriteRule ^solutions$ http://newurl.com [L,R=301]
RewriteRule ^offshore$ http://newurl.com/business/offshore [L,R=301]
RewriteRule ^contact-us$ http://newurl.com/business/about-us/contact [L,R=301]
RewriteRule ^history$ http://newurl.com/business/about-us/history [L,R=301]
RewriteRule ^installations-in-operation$ http://newurl.com/business/about-us/installations-in-operation [L,R=301]
RewriteRule ^mcp-insight$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^newsevents$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^protu_roaming.php$ http://newurl.com/business/about-us/installations-in-operation [L,R=301]
RewriteRule ^coverage.php$ http://newurl.com/business/about-us/installations-in-operation [L,R=301]
RewriteRule ^press-kit$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule (.*) http://newurl.com [L,R=301]

Aqueles que não funcionam:

RewriteRule ^press-release-mcp-and-tmr-integrate-to-seize-maritime-communications-opportunities$ http://newurl.com/news/press-release-mcp-and-tmr-integrate-to-seize-maritime-communications-opportunities [L,R=301]
RewriteRule ^press-release-bygger-verdens-storste-4g-nett-offshore$ http://newurl.com/news/press-release-bygger-verdens-storste-4g-nett-offshore [L,R=301]
RewriteRule ^press-release-33-cruise-ships-with-mobile-and-internet-services-from-mcp$ http://newurl.com/news/press-release-33-cruise-ships-with-mobile-and-internet-services-from-mcp [L,R=301]
RewriteRule ^press-release-mcp-to-install-4g-infrastructure-on-norwegian-continental-shelf-with-shell$ http://newurl.com/news/press-release-mcp-to-install-4g-infrastructure-on-norwegian-continental-shelf-with-shell [L,R=301]
RewriteRule ^press-release-returns-to-win-offshore$ http://newurl.com/news/press-release-returns-to-win-offshore [L,R=301]
RewriteRule ^can-it-be-true-that-todays-improvements-in-communication-for-the-offshore-environment-initiate-a-paradigm-shift$ http://newurl.com/news/can-it-be-true-that-todays-improvements-in-communication-for-the-offshore-environment-initiate-a-paradigm-shift [L,R=301]
RewriteRule ^how-mobile-data-roaming-increases-your-mobile-data-traffic$ http://newurl.com/news/how-mobile-data-roaming-increases-your-mobile-data-traffic [L,R=301]
RewriteRule ^why-is-improved-personalized-communication-paramount-for-the-offshore-industry$ http://newurl.com/news/why-is-improved-personalized-communication-paramount-for-the-offshore-industry [L,R=301]
RewriteRule ^why-mobile-data-will-remain-the-most-important-source-of-revenue$ http://newurl.com/news/why-mobile-data-will-remain-the-most-important-source-of-revenue [L,R=301]
RewriteRule ^color-line-extends-contract-with-mcp$ http://newurl.com/news/color-line-extends-contract-with-mcp [L,R=301]
RewriteRule ^author/mcp$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^author/andreas-lutebergetmcp-com$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^author/roar-walderhaugmcp-com$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^archives/press-releases$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^archives/news$ http://newurl.com/business/about-us/news-events [L,R=301]
RewriteRule ^archives/insights$ http://newurl.com/business/about-us/news-events [L,R=301]
    
por adnedelcu 03.03.2016 / 10:58

1 resposta

-1

Uma parte do problema pode ser this , o redirecionamento permanente é em cache pelos navegadores (e não, o modo privado não ajuda no caso do Google Chrome).

Outra coisa que eu descobri (ter a vantagem de saber tanto a URL original quanto a nova) é que no Firefox (no modo privado) a URL antiga não é mais redirecionada (mal) e apenas lança um erro 404. (porque os redirecionamentos ruins foram excluídos do arquivo .htaccess). Isso me faz pensar no problema como sendo um cache ainda mais.

Estas são as minhas descobertas até agora, não acho que o problema deva ser analisado de outra perspectiva, uma vez que os sistemas novos não têm o mesmo comportamento que os ambientes testados.

Honestamente, ficaria feliz em ver uma resposta melhor do que esta, se houver alguma:)

    
por 13.05.2016 / 20:09