# Remove the php extension from the filename
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

# Set the headers for the restful api
Header always set Access-Control-Allow-Origin *
Header always set Access-Control-Allow-Origin https://www.apprentissage-montpellier.education/
Header always set Access-Control-Allow-Origin http://localhost:4010/
Header always set Access-Control-Allow-Origin http://137.74.201.50:4010/
#Header always set Access-Control-Allow-Origin http://apprentissage-montpellier.education/preprod/
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
