What are some best practices for troubleshooting a 403 error when using .htaccess in PHP?

A 403 error in PHP when using .htaccess typically means that the server is denying access to the requested resource. To troubleshoot this issue, check the permissions on the file or directory in question, ensure that the .htaccess file is properly configured, and verify that there are no conflicting rules causing the error.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>