# Turn rewrite engine on
Options +FollowSymlinks
RewriteEngine on
RewriteRule .* - [E=Authorization:%{HTTP:Authorization}]

Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type, Authorization"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"


# map neat URL to internal URL
RewriteRule ^controllers/(.*)/$   api/RestController.php?view=all&request=$1 [nc,qsa]

RewriteRule ^logout/(.*)/$   api/RestController.php?view=logout&request=$1 [nc,qsa]
RewriteRule ^loginValidate/$   api/RestController.php?view=login [nc,qsa]
RewriteRule ^customSearch/(.*)/$   api/RestController.php?view=customSearch&request=$1 [nc,qsa]
RewriteRule ^checkdb/$   api/RestController.php?view=checkdb [nc,qsa]
RewriteRule ^uploadImage/$   api/RestController.php?view=uploadImage [nc,qsa]
RewriteRule ^signin/$   api/RestController.php?view=signin [nc,qsa]
RewriteRule ^video_feeds/$   api/RestController.php?view=video_feeds [nc,qsa]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
