htaccess questions

<Directory>

</Directory>
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 pictures.pl 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.

http://httpd.apache.org/docs/2.2/rewrite/intro.html#htaccess

<VirtualHost>

RewriteEngine On
RewriteOptions Inherit

https://alexcican.com/post/how-to-remove-php-html-htm-extensions-with-htaccess/
———————————-

cache files

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

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

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s