3 ms·
In the .htaccess: RewriteEngine on RewriteCond ${REQUEST_FILENAME} !-D RewriteRule "^((?:.*/)*[^/.]+)$" "$1.html" [NC]
by zck 6y ago
In the .htaccess:
RewriteEngine on
RewriteCond ${REQUEST_FILENAME} !-D
RewriteRule "^((?:.*/)*[^/.]+)$" "$1.html" [NC]
- johnx123-up 6y agoThank you
- hunter2_ 6y agoAny reason not to just use Options MultiViews instead?
- zck 6y agoMainly because I did not know that existed. I'll have to test it before thinking about switching it out. I wonder if there's some sort of unit test suite for .htaccess configurations -- big changes like this could definitely break something, and my config works for me now. It does seem like it might be more magic than I prefer in programming, though.