Htaccess File

ajhades/inventario-slim/backup/API/.htaccess

GET, POST, PUT, REQUEST_FILENAME, REQUEST_METHOD
# CORS Headers (add this for development purpose only )
# if you are using cordova or phonegap you don;t need this , they can handle CROS
<ifModule mod_headers.c>
    Header always set Access-Control-Allow-Origin: "*"
    Header always set Access-Control-Allow-Methods "POST, GET, PUT, DELETE, OPTIONS"
    Header always set Access-Control-Allow-Headers "authorization,content-type"
</ifModule>
# CORS OPTIONS (Important: add this too)
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]

RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Exit mobile version