0

I'm trying to change my url from domani.com/index.html to domain.com/index , i tried many options, but none worked. i am using aruba as server, i don't know is important and windows hosting

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [QSA,L]

1 Answers1

0

Try this one, it should work

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L]
Joseph
  • 5,644
  • 3
  • 18
  • 44
  • I tried, but always the same error 1° "HTTP Error 404.17 - Not Found" when i refresh this "HTTP Error 404.3 - Not Found" –  Jan 24 '20 at 09:38