Hello all !
I’m working on a WordPress website for a client. It’s my first experience with this tool so maybe I have overlooked something.
The issue we got is that some pages in the admin dashboard are blocked. I have a simple 403 “Forbidden you don’t have permission to access this resource”.
This happens also when I open some modals.
I think I have traced the error back to the .htaccess file in the wp-admin folder. In there I have a FileMatch condition and the pages where the forbidden errors happen match the missing files in the FileMatch condition.
So I edit the .htaccess to handle these files again. I test on the admin dashboard and the pages are now ok. But as soon as I refresh the page, the forbidden error comes back and the .htaccess file changes are reverted.
I have tried to make the .htaccess file read-only (chmod 440) after my changes but it is ignored, the file content is still replaced and the file permissions are back to write (640).
I have tried with the `# BEGIN WordPress` hack, it is ignored and the file is overwritten with its file permissions.
I have tried to put the default rewrite parts of WordPress inside a fake apache module, so it would be ignored. But the file is still completely overwritten to its default state.
I have added `add_filter(‘flush_rewrite_rules_hard’,’__return_false’);` at the end of rewrite.php, wp-rewrite.php, config.php. The .htaccess file is still overwritten.
What am I missing ?
EDIT : I have ftp access to the host server, not ssh access.
[ad_2]