l0b0/Standardy/master/www/.htaccess - Htaccess File


# $Id$

# Password protection settings
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /var/www/org/example/.htpasswd
AuthGroupFile /dev/null

# Enable content negotiation
Options +MultiViews

# MIME type negotiation setup
AddType application/xhtml+xml .xhtml
AddType text/html;q=0.7 .html
DirectoryIndex index

### Language negotiation setup

# Available languages
AddLanguage en .en
AddLanguage fr .fr

# Priority (highest first)
LanguagePriority en fr

# Fallback to specified language priority if the browser doesn't supply any of the supported languages
ForceLanguagePriority Fallback

RewriteEngine On
RewriteBase /

# Set the language from the URL parameter
RewriteCond %{QUERY_STRING} ^(?:.*&)?language=(en|fr).*$
RewriteRule ^ - [env=prefer-language:%1]

# Set folder of custom php.ini
suPHP_ConfigPath /var/www/org/example/

# Password protect PHP info
<Files phpinfo.php*>
  require valid-user

# Hide .htaccess and .htpasswd
<FilesMatch "^.ht.*$">
  Order allow,deny
  Deny from all

# Hide error log
<Files error.log>
  Order allow,deny
  Deny from all

# vCard MIME type + encoding must be forced for some reason
<Files *.vcf>
  ForceType 'text/x-vcard; charset=ISO-8859-1'

On Github License


Download PDF of Htaccess file