PHP code example of roots / wp-h5bp-htaccess

1. Go to this page and download the library: Download roots/wp-h5bp-htaccess library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

roots / wp-h5bp-htaccess example snippets


add_filter('roots/h5bp-htaccess-filters', function($rules_filters) {
  // comments out all `RewriteRule`s
  $rules_filters['RewriteRule'] = '# RewriteRule';
  return $rules_filters;
});

add_filter('roots/h5bp-htaccess-rules', function($server_config_rules) {
  // Removes all comments and whitespace
  return preg_replace(['/#.*/', '/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/'], ['',PHP_EOL], $server_config_rules);
});