Question
.htaccess crashes my wordpress website
Ok, I’ve struggled with this problem for several days now, and I don’t know how to fix it. Apparently I need to create an .htaccess file in order to allow my users to start accessing the posts and pages in my wordpress website, but adding an .htaccess in /var/www/seonbinovels.com/public_html just crashes the website. No error 500 or anything. Straight up crashes the website.
Here’s the code that I put into htaccess, seemed pretty ok to me…
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
But the server just crashes. I’ve tried to see what was wrong by typing in apache2 -S in the console, but all I got was:
Apache error: Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
I don’t even know what that means… In any case, I checked that mod rewrite was indeed on, and I’ve also allowed overrides in 000-default.conf. And yet my site still crashes. Does anyone know how I can fix this..?
P.S. I’ve checked the apache2 error logs, and found hundreds of lines that said PHP warnings. I don’t know what that means or how I should fix it, but maybe that’s related to all this?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×