4 ms·
That Nginx config is so beautiful compared to Apache .htaccess configuration for the same result.
by unobatbayar 4y ago
That Nginx config is so beautiful compared to Apache .htaccess configuration for the same result.
- ErikMarf 4y agoI usually create a "file filter" instead. Keep the extension as is (hi.html) and then use the try_files directive in nginx to make the server look for files with the same path using .html as an example. It has been a while since I used nginx but it looks something like this: try_files $uri.html
- innocenat 4y agoIs it? Assigning text/html to extensionless file would be: <FilesMatch "^[^.]+$"> ForceType text/html </FilesMatch> Which I don't think is that bad, compared to RewriteRule's.