PHP Classes

File: public_html/.htaccess

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   public_html/.htaccess   Download  
File: public_html/.htaccess
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Binkterm PHP
Bulletin board system based on the Web
Author: By
Last change:
Date: 5 days ago
Size: 1,291 bytes
 

Contents

Class file image Download
RewriteEngine On # Cache-Control headers <IfModule mod_headers.c> # Service Worker script: spec-recommended no-cache so browsers always check # for updates via conditional request, but can use ETags for 304 responses. # Must be declared BEFORE the generic .js rule so it takes precedence. <FilesMatch "^sw\.js$"> Header set Cache-Control "no-cache" </FilesMatch> # CSS/JS: Must check with server before using cached copy <FilesMatch "\.(css|js)$"> Header set Cache-Control "max-age=0, must-revalidate" </FilesMatch> </IfModule> #RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4 RewriteCond %{DOCUMENT_ROOT}/maint/ -d #RewriteCond %{SCRIPT_FILENAME} !yourip.php RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f RewriteCond %{SCRIPT_FILENAME} !/maint/ RewriteRule ^.*$ /maint/ [R=503,L] ErrorDocument 503 /maint/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,L] # Handle trailing slashes RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [R=301,L] # Route everything through index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,L]