html files redirecting to error page
We just upgraded to Contao 2.11.2. We have a folder containing html emails on the server. Whenever I try to open the html files in a web browser I'm getting a 404 error. I can change the file extension to .php instead of .html and then see them. I know it has something to do with the .htaccess file. When I pull it down temporarily I was able to view the .html files again in my browser. Does anyone know how I can fix this issue so that html files on the server are viewable?
Re: html files redirecting to error page
There's a line in the .htaccess file with a bunch of pipe-separated file extensions:
https://github.com/contao/core/blob/mas ... fault#L151
Add "html" to that list, and I think that will do it.
P.S. If "HTML" is also your URL suffix, then that won't work. You'd need an additional rule to not rewrite .html files in a specific folder (where those emails are being stored).
I forget exactly how to do this, but it's something like "RewriteCond %{REQUEST_URI} !/someFolderName/.*" And it goes right before the rewrite rule.
Re: html files redirecting to error page
Thanks for the reply. I may just rename the files to .htm for now. It's strange though, we're running the same Contao versions on two other servers and not getting the issue with those severs.