How do I make my website URL turn from https://example.com/file.html to https://example.com/file?

67 views Asked by At

How do I make my website URL turn from https://example.com/file.html to https://example.com/file? I am using Repl.it to host my website.

.htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.htm -f
RewriteRule ^(.*)$ $1.htm [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.asp -f
RewriteRule ^(.*)$ $1.asp [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.aspx -f
RewriteRule ^(.*)$ $1.aspx [L]
1

There are 1 answers

0
MrWhite On

I am using Repl.it to host my website.

From the many responses on the replit.com forums (such as 1, 2 and 3), it would seem they do not support .htaccess files (or even use Apache for that matter).

Although you can vote on the feature request: