Have a website with subpages all in this format:
mydomain.com/something
That's fine. But what is NOT fine is that you can also do mydomain.com/something/index.php
(you can enter address in this format into your browser) and you still get the content on that mydomain.com/something
.
I don't want those two possibilites to be available at the same time, Google doesn't like this. I want just one to be possible.
So what I want to do is whenever you type into your browser mydomain.com/something/index.php
, you will be redirected to mydomain.com/something
(without that /index.php
at the end).
How should I write a .htaccess code to do something like this?