wsoe_get_htaccess_rules

Rules for .htaccess files.

Description

wsoe_get_htaccess_rules(); 

Usage

  1. if ( !function_exists( 'wsoe_get_htaccess_rules' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-simply-order-export/lib/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wsoe_get_htaccess_rules(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/lib/functions.php  
  1. function wsoe_get_htaccess_rules() { 
  2.  
  3. // Prevent directory browsing and direct access to all files, except images 
  4. $rules = "Options -Indexes\n"; 
  5. $rules .= "deny from all\n"; 
  6. $rules .= "<FilesMatch '\.(jpg|png|gif|mp3|ogg)$'>\n"; 
  7. $rules .= "Order Allow, Deny\n"; 
  8. $rules .= "Allow from all\n"; 
  9. $rules .= "</FilesMatch>\n"; 
  10.  
  11. return apply_filters( 'wsoe_protected_directory_htaccess_rules', $rules );