How to create a very small footprint based API Gateway using Apache, .htaccess, PHP and PDO Library.
htaccess
Serve PHP files as JavaScript output
It would be often good to embed .js file output with dynamic content. The trick is very simple: We will request Apache search for .php files if we request their .js file. For example, variables.php file will exist physically and contain the PHP scripts inside it. But it will be accessed as variables.js. We will […]