1

I could really do with some help here please. I know this is a WordPress issue now through testing. If I allow .htaccess to process rewrites on my Wordpress sites by adding AllowOverride FileInfo to the https conf file, my WordPress sites all redirect to the AlmaLinux default page due to no default index page present for the root URL. If I don't allow it to process the .htaccess it works but I need to use .htaccess What is going on here?

Here is my WordPress site .htaccess file that would get processed if I uncomment AllowOverride FileInfo and then it breaks WordPress by redirecting everything to the AlmaLinux default page. This is created by WordPress itself

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Thank you so much in advance for anyone who can dig me out of this.

0

1 Answer 1

1

FIXED I should have looked in Apache error logs in the first place. I just did and found:

[Wed Mar 29 23:17:59.234743 2023] [rewrite:error] [pid 133333:tid 133444] [client 81.11.11.11:53583] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/www.mysite.com/

Doing a search for the error we see: If your server is set with both FollowSymLinks and SymLinksIfOwnerMatch off, then rewrite rules will stop working

Simple as that!

So I went through all my sites in the Apache conf files and changed: Options None to: Options SymLinksIfOwnerMatch

Fixed

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .