How to Serve Cache Only via PHP

On servers using apache, the cache is served via htaccess thanks to the rewrite rule. It is the best method to serve cache.

However sometimes you may need to turn off the rewrite rule method for development. You can turn this feature off as below and have the cache serve only via php.

You need to add the following lines after <?php which exists at the top of wp-config.php file.