![]() |
|
How to fix Mod_Security error message on image pages - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: How to fix Mod_Security error message on image pages (/thread-13547.html) |
How to fix Mod_Security error message on image pages - J_C - 2021-03-24 For anyone getting the following error message on their server when clicking on an image page, I found a solution that works for me and wanted to pass it along- "An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security." I'm on Hostgator, and after a recent update on their servers to PHP 7.4.16, Zenphoto would no longer run (my version was a few behind). After updating to the latest 1.5.7, whenever I clicked on an image page they would fail to load and I would get that error message. I saw other suggestions saying that you have to turn off mod_security in .htaccess, or turn off mod_rewrite under the URL options, but that was not the case for my server. To fix the issue, what you have to do is not use .php as a suffix under Options-URL options:mod_rewrite suffix. I was able to use .html or leave it blank and both worked. That way I was able to still use mod_rewrite to get "nice cruft-free URLs". I've been using the previous option for years, so I'm not sure if it was the PHP update, Zenphoto updates, or a new server security setting that caused the issue, but I wanted to pass along the solution I found if it helps anyone else. How to fix Mod_Security error message on image pages - acrylian - 2021-03-24 Thanks. And also never leave thte modrewrite suffix blank as that also may trigger security measures and also SEO issues as it then may look like a script page pretending to be an image. |