Hello vest24,
Hope you are having great week so far!
I think the problem is that you are having way too much redirects in your .htaccess
Please check this page from the Apache project – https://httpd.apache.org/docs/2.4/configuring.html
You will find there this explanation:
The maximum length of a line in normal configuration files, after variable substitution and joining any continued lines, is approximately 16 MiB. In .htaccess files, the maximum length is 8190 characters.
So it seems like you can’t have .htaccess files with more than 8190 characters. If you divide that by the number of your lines, you should have around 16 character on line. ??
Maybe you could use some regex for some of the links?
Or they are all different and that is not possible?
Another workaround you could use is to put this redirects in php file, and then redirect from there.
You will need to check which is the requested url and redirect accordingly to the new one
You can check the requested URL with this php code:
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
And then use something like this:
<?php
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
if ($actual_link == "https://domain.com/some-link";){
header('HTTP/1.1 301 Moved Permanently');
header('Location: https://www.domain.com/another-link');
}
?>
Please note I haven’t tested this code, and redirect may result in redirect loops and leave out from your WordPress install unable to log in. So use with caution.
But that will require hell of a lot if statements, and will put a huge load on the server. So I am not really sure how to handle this with so many redirects.
Maybe you could separate this in a few php files in a different directories?
Hope this helps.
Thanks,
Ivan