500 Server error instead of 404 on nested urls due to mod rewrite htaccess rule(s)
问题 I have a site with custom .htaccess file that handles few things: 1) It treats urls without ".php" extensions as if it has ".php" in the end. 2) It redirects http:// and http://www. urls to https://www. Here is the .htaccess file: ErrorDocument 404 /404.php Options -MultiViews RewriteEngine On ## add www and turn on https in same rule RewriteCond %{HTTP_HOST} !^www\. [NC,OR] RewriteCond %{HTTPS} !on RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] RewriteRule ^ https://www.%1%{REQUEST_URI} [R