# BEGIN WordPress
# Les directives (lignes) entre « BEGIN WordPress » et « END WordPress » sont générées
# dynamiquement, et doivent être modifiées uniquement via les filtres WordPress.
# Toute modification des directives situées entre ces marqueurs sera surchargée.
<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

Options -Indexes


<FilesMatch "\.php$">
    Order Deny,Allow
    Deny from all
</FilesMatch>

<FilesMatch "\..*">
    Order Deny,Allow
    Deny from all
</FilesMatch>

<FilesMatch "\.(svg|jpg|jpeg|png|css|js|xml|woff|woff2|ttf|ico|gif)$">
    Order Allow,Deny
    Allow from all
</FilesMatch>

<Files "index.php">
    Order Allow,Deny
    Allow from all
</Files>

<If "%{REQUEST_URI} =~ m#^/wp-.*\.php$#">
    Order Allow,Deny
    Allow from all
</If>

#Autoriser l'accès aux fichiers PHP dans wp-admin
<If "%{REQUEST_URI} =~ m#/wp-admin/.*\.php$#">
    Order Allow,Deny
    Allow from all
</If>

#Autoriser l'accès aux fichiers PHP dans wp-plugin
<If "%{REQUEST_URI} =~ m#/wp-content/.*\.php$#">
    Order Allow,Deny
    Allow from all
</If>
