htaccess questions


400 – Bad request
401 – Authorization Required
403 – Forbidden
404 – File Not Found
500 – Internal Server Error

ErrorDocument 404 /filenotfound.html

DirectoryIndex index.php3 index.php index.html default.htm

The use of .htaccess files can be disabled completely by setting the AllowOverride directive to none:

AllowOverride None

mod_rewrite directives must go in .htaccess files.


RewriteEngine On
RewriteOptions Inherit

cache files

# 1 Month for most static assets
<filesMatch “.(css|jpg|jpeg|png|gif|js|ico)$”>
Header set Cache-Control “max-age=2592000, public”

max-age=2592000 (in secounds  2592000 1 month)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s