如何重定向:
https://www.portal-gestao.com/entrar-na-sua-conta.html?redirecionar=/f%C3%B3rum-perguntas-e-respostas/conversation/read.html?id=25至:
https://www.portal-gestao.com/f%C3%B3rum-perguntas-e-respostas/conversation/read.html?id=25使用.htaccess和regex
我在努力:
RewriteCond %{THE_REQUEST} /entrar-na-sua-conta.html?redirecionar=/([^\s&]+) [NC]
RewriteRule ^ https://www.portal-gestao.com/%1? [L,R=302]和:
RewriteRule ^entrar-na-sua-conta.html?redirecionar=/(.*)$ /$1 [R=301,L]发布于 2016-04-19 12:59:31
是regex中的一个特殊字符,因此您需要在cond的模式中转义它,以匹配:
RewriteCond %{THE_REQUEST} /entrar-na-sua-conta.html\?redirecionar=/([^\s&]+) [NC]
RewriteRule ^ https://www.portal-gestao.com/%1? [L,R=302]https://stackoverflow.com/questions/36718300
复制相似问题