301 reindirizzamento non funziona correttamente con PHP nel vecchio URL
-
28-09-2020 - |
Domanda
Questo URL
Redirect 301 /productdetail.php?pId=11390&base=1 http://domain.com/new-magento-url.html
.
Questo funziona
Redirect 301 /supertest http://domain.com/new-magento-url.html
.
Posso vedere che è il .php ma come faccio a se non per quello?
Soluzione
RewriteCond %{QUERY_STRING} pId=11390&base=1
RewriteRule productdetail.php http://example.com/new-magento-url.html? [R=301,L]
.
che dovrebbe corrispondere alla stringa di query che desideri ed esegui il reindirizzamento.Mettilo sopra l'ultima riscrittura magenta per index.php
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange