So I striped all my html extensions and can now visit both the one with the extension and the one without it.
Does google see having /example.php and /example as duplicate content now?
How would I make it so only the file without the html extension shows?
my code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
The whole concept of hiding existing files but still delivering them is kind of weird, but technically it would work like the following
This does a redirect from
/example.htmlto/exampleand returns a http status code 301 (“Moved permanently”). This tells e.g. google that the content of this page has moved.