So I've got a customer who came to me for help with his .htaccess.
He's got a site with a subfolder that has a .htaccess with custom 404s. All good, right? Right. So, what's the problem, then? The problem is that his main site also has .htaccess. The two seem to be interfering with each other and generating an infinite loop.
Main site .htaccess:
Subfolder .htaccess:
I also tried with some variations of /404.php, /vice/404.php and full URLs, etc. None of it is working.
I tried with this:
Obviously, this doesn't quite work and usually results in:
Any idears, folks?
He's got a site with a subfolder that has a .htaccess with custom 404s. All good, right? Right. So, what's the problem, then? The problem is that his main site also has .htaccess. The two seem to be interfering with each other and generating an infinite loop.
Main site .htaccess:
Code:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /view.php?id=$1 [L,QSA] RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # END SSL config
Code:
ErrorDocument 404 https://mypastebin.com/vice/404.php
I tried with this:
Code:
ErrorDocument 404 https://mypastebin.com/vice/404.php RewriteEngine On #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
Code:
[Tue Oct 18 07:19:32.109454 2016] [core:error] [pid 18255] [client xxx.xxx.xxx.xx:11271] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Comment