Is there a way to remove the ".html" extension with .htaccess using
GavHern (64)

I tried updating my site to use an .htaccess file to remove the .html file extension from the URL. This did not work and I'm just getting the replit 404 pages. Here's my code:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L]

Is there an issue with my code or does not support .htaccess rules? If it's not allowing it, is there any way I can do this without an .htaccess just as easily? Thanks. (I'm also wondering, if I link my repl to an actual domain will this issue still occur?)

You are viewing a single comment. View All
Answered by a5rocks (515) [earned 5 cycles]
View Answer
GavHern (64)

@a5rocks I've tried my code on GitHub pages and it works fine. Any info on where I could learn to use flask or Express for this