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)

Leave a comment