File: app/.htaccess

Recommend this page to a friend!
  Classes of Laudir Bispo  >  PHP Real Estate Website  >  app/.htaccess  >  Download  
File: app/.htaccess
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Real Estate Website
Manage the properties of a real estate business
Author: By
Last change:
Date: 5 months ago
Size: 3,251 bytes


Class file image Download
<IfModule mod_rewrite.c>

#<IfModule mod_negotiation.c>
#    Options -MultiViews

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteBase /app
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^login/?$ login.php [NC,L]
RewriteRule ^admin/?$ admin.php [NC,L]
RewriteRule ^loockscreen/?$ /app/loockscreen.php [NC,L]

RewriteRule ^admin/([\.a-z,0-9,A-Z,_-]+)$ admin.php?page=$1 [QSA,L]
RewriteRule ^admin/([\.a-z,0-9,A-Z,_-]+)\/([\.a-z,0-9,A-Z,_=#-]+)$ admin.php?page=$1&actionid=$2 [QSA,L]
#RewriteRule ^support/([\.a-z,0-9,A-Z,_-]+)$ support.php?pageHelp=$1 [QSA,L]

DirectoryIndex /app/login.php

ErrorDocument 401 /401.php
ErrorDocument 402 /402.php
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php

# Prevent downloading files .htaccess (Default configuration of Apache)
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all

    Order allow,deny
    Allow from all
    Deny from env=bad_bot

#Força a utilizar Cache-Control e Expires header
<IfModule mod_headers.c>
  Header unset ETag

#Força a utilizar Cache-Control e Expires header
<IfModule mod_headers.c>
  Header unset ETag
FileETag None
<IfModule mod_expires.c>
 ExpiresActive on
 ExpiresDefault "access plus 1 month"
 ExpiresByType text/cache-manifest "access plus 0 seconds"
 # Html
 ExpiresByType text/html "access plus 0 seconds"
 # Data
 ExpiresByType text/xml "access plus 0 seconds"
 ExpiresByType application/xml "access plus 0 seconds"
 ExpiresByType application/json "access plus 0 seconds"
 # Feed
 ExpiresByType application/rss+xml "access plus 1 hour"
 ExpiresByType application/atom+xml "access plus 1 hour"
 # Favicon
 ExpiresByType image/x-icon "access plus 1 week"
 # Media: images, video, audio
 ExpiresByType image/gif "access plus 1 month"
 ExpiresByType image/png "access plus 1 month"
 ExpiresByType image/jpg "access plus 1 month"
 ExpiresByType image/jpeg "access plus 1 month"
 ExpiresByType video/ogg "access plus 1 month"
 ExpiresByType audio/ogg "access plus 1 month"
 ExpiresByType video/mp4 "access plus 1 month"
 ExpiresByType video/webm "access plus 1 month"
 # HTC files
 ExpiresByType text/x-component "access plus 1 month"
 # Webfonts
 ExpiresByType application/x-font-ttf "access plus 1 month"
 ExpiresByType font/opentype "access plus 1 month"
 ExpiresByType application/x-font-woff "access plus 1 month"
 ExpiresByType image/svg+xml "access plus 1 month"
 ExpiresByType application/ "access plus 1 month"
 # CSS / JS
 ExpiresByType text/css "access plus 1 year"
 ExpiresByType application/javascript "access plus 1 year"
 ExpiresByType application/x-javascript  "access plus 1 year"
#Força o IE a sempre carregar utilizando a última versão disponível
<IfModule mod_headers.c>
  Header set X-UA-Compatible "IE=Edge,chrome=1"
  <FilesMatch "\.(js|css|gif|png|jpeg|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
    Header unset X-UA-Compatible
For more information send a message to info at phpclasses dot org.