I need to redirect the exact url https://www.casadapalavra.com.br/index.php to https://www.casadapalavra.com.br
And I'm using the following:
redirectMatch 301 ^casadapalavra.com.br/index.php$ https://www.casadapalavra.com.br
Apparently it works and actually redirects to the homepage, but when I go to test on some redirection site like https://httpstatus.io/ , it says that the redirect went to the same path:
http://www .casadapalavra.com.br/index.php
But because of SEO I need to ensure that it is interpreted that the redirect went to the home page (without index.php). I really tried several codes here, but the others caused redirects in urls that also have index.php somewhere in their path and that shouldn't redirect, for example: http://www.casadapalavra.com.br/livros/index .php?code=264
Because the redirect check sites don't understand that the redirect went to the homepage and insist on saying that it was redirected to the same place while in the browser I'm actually taken to the homepage without index.php
I simply need to redirect variations with and without https/http/nowww/www from the path ^casadapalavra.com.br/index.php$ to the home page.
Can anyone guide me? It sounds simple, but everything I've tested doesn't work as expected.