ProCacheHtaccess::removeHtaccessRules()

Remove ProCache .htaccess rules from given fileContents and return it

Usage

// basic usage
$string = $proCacheHtaccess->removeHtaccessRules(string $fileContents);

// usage with all arguments
$string = $proCacheHtaccess->removeHtaccessRules(string $fileContents, array $options = []);

Arguments

NameType(s)Description
$fileContentsstring
$options (optional)array
  • replaceWith (string): Optionally replace rules with this string
  • returnRemoved (bool): Return removed rules rather than .htaccess contents without rules?
  • removeComments (bool): Remove comments from returned rules?
  • removeBlankLines (bool): Remove blank lines from returned rules?
  • removeLinesHaving (array): Also remove lines having any of these strings (not case sensitive).

Return value

string


ProCacheHtaccess methods and properties

API reference based on ProcessWire core version 3.0.251