Htaccess File

lkorth/MVHPC/master/.htaccess

# Use PHP5.3 Single php.ini as default
AddHandler application/x-httpd-php53s .php
# This turns on mod_rewrite and redirects according to the rules below

RewriteEngine On
RewriteRule    ^old-site/?([.]*)$ old-site/$1 [NC,L]
RewriteRule    ^archives/images/(.*)$     pages/page-controller.php?page=archives&subpage=images&subpage2=$1&subpage3=    [NC,L,B]
RewriteRule    ^([a-z0-9-]+)/?([a-z0-9-]*)/?([a-z0-9,@- %&_-]*)/?([a-z0-9]*)/?$     pages/page-controller.php?page=$1&subpage=$2&subpage2=$3&subpage3=$4    [NC,L,B] #rewrite all /foo to single page controller

# ----------------------------------------------------------------------
# Prevent 404 errors for non-existing redirected folders
# ----------------------------------------------------------------------

# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist
#   e.g. /blog/hello : webmasterworld.com/apache/3808792.htm

Options -MultiViews

# ----------------------------------------------------------------------
# Custom Error pages
# ----------------------------------------------------------------------

ErrorDocument 404 /error/error.php?type=404
ErrorDocument 500 /error/error.php?type=500
ErrorDocument 403 /error/error.php?type=403

# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss .atom

# Cache for 1 week
<filesMatch ".(ico|woff|ttf|pdf|doc)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>

# Cache for 8 hours
<filesMatch ".(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=28800, public"
</filesMatch>
Exit mobile version