Install download the composer using the following curl  command in the terminal: curl -sS https://getcomposer.org/installer | php After the command, you will have composer.phar file in the current directory and the composer command is available as: php composer.phar [composer commnad] In order to make composer available globally, you have to move the recently downloaded composer.phar to local user’s bin folder as follow: […]

custom CORS configurations to allow cross domain font access

This sets the Access-Control-Allow-Origin CORS configuration to allow pulling from all domains. You may also want to serve fonts to only specific domain, for that you have to replace ‘*’ with the domain names seperated with comma.

Enalbe mod_expires on server LoadModule expires_module modules/mod_expires.so And make following changes on htaccess file. enable Cache-Control headers

enable Expires headers

You might also turn on the ‘KeepAlive’ connection. Read more on ‘keepalive’ https://abdussamad.com/archives/169-Apache-optimization:-KeepAlive-On-or-Off.html Add the following code on htaccess to turn on ‘KeepAlive’, And you should know that Keepalive will improve website loading […]

First we create a rule on htaccess and redirect the pdf files to a php with its path as query string

The sample code for the pdf-viewer.php.