TribalSystems/Zenario/7.3/.htaccess - Htaccess File


Options -Indexes

<ifModule mod_headers.c>
  Header always append X-Frame-Options SAMEORIGIN

<IfModule pagespeed_module>
  ModPagespeed off

<IfModule mod_deflate.c>
  #SetOutputFilter DEFLATE
  AddOutputFilterByType DEFLATE text/css text/csv text/html text/plain text/xml text/javascript application/javascript application/x-javascript
  php_flag zlib.output_compression Off
<IfModule !mod_deflate.c>
  php_flag zlib.output_compression On

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/svg+xml "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 month"
    ExpiresByType image/ "access plus 1 month"
    ExpiresByType application/x-javascript "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Redirect admin/ to zenario/admin/
  RewriteRule ^admin$ zenario/redirect.php?redirect=admin/ [L]
  RewriteRule ^admin/(.*)$ zenario/redirect.php?redirect=admin/$1 [L,QSA]

  # Correct any bad relative-URLs
  RewriteRule ^[/,A-Za-z0-9~_-]*/(public|private|zenario|zenario_custom|zenario_extra_modules)/(.*)$ zenario/redirect.php?redirectdir=$1&redirect=$2 [L,QSA]
  # Favicons
  RewriteRule ^favicon.ico$ zenario/file.php?usage=favicon [L]
  # Friendly URLs:
  RewriteCond %{REQUEST_URI} !/(admin|public|private|zenario|zenario_custom|zenario_extra_modules|purchased_downloads)/
  RewriteRule ^([/,A-Za-z0-9~_-]+)(|.htm|.html)$ index.php?cID=$1 [L,QSA]
  # Download Now links:
  RewriteRule ^([/,A-Za-z0-9~_-]+).download$ index.php?cID=$1&download=1 [L]
  # RSS feeds:
  RewriteRule ^([/,A-Za-z0-9~_-]+).rss$ index.php?cID=$1&method_call=showRSS [L]
  # A friendly URL for the XML sitemap:
  RewriteRule ^sitemap.xml$ index.php?method_call=showSitemap [L]
  # Remove cached pages and stats from public view:
  RewriteRule ^cache/.*$ - [F,NC]

  # Remove the build, backup and docstore directories from public view if they were placed here:
  RewriteRule ^build/.*$ - [F,NC]
  RewriteRule ^backup/.*$ - [F,NC]
  RewriteRule ^docstore/.*$ - [F,NC]
  # Remove yaml files, phrases and custom frameworks from public view:
  RewriteRule ^zenario.*.yaml$ - [F,NC]
  RewriteRule ^zenario.*/phrases/.*$ - [F,NC]
  RewriteRule ^zenario.*/admin_phrase_codes/.*$ - [F,NC]
  RewriteRule ^zenario_custom/frameworks/.*.html$ - [F,NC]
  # Remove any svn directories from public view:
  RewriteRule .*.svn.*$ - [F,NC]
  # A rule for testing whether the htaccess file is working
  RewriteRule ^zenario/includes/test_files/is_htaccess_working.txt$ zenario/includes/test_files/htaccess_is_working.txt [L]

On Github License


Download PDF of Htaccess file