Menu
The Tech Paper
  • Home
  • Interview Questions
    • PHP String Interview Question
    • PHP Array Interview Qutions
    • jQuery Interview Quetions
    • PHP Interviwe Question on php.ini file
    • htaccess File Interview Quetions
  • About
The Tech Paper

htaccess File Interview Quetions

Posted on May 8, 2017July 11, 2020

<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 Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Docker
  • Git
  • Interview Questions
  • Laravel
  • Linux
  • php

Recent Posts

  • Create a swap memory in Linux
  • Hide protected files in Laravel
  • Make a bootable pendrive in Linux
  • Docker Commands
  • Git Commands

Archives

  • December 2020
  • September 2020
  • July 2020
  • January 2020
  • July 2019
  • August 2018
  • June 2018
  • April 2018
  • September 2017
  • June 2017
  • May 2017

Recent Posts

  • Create a swap memory in Linux December 2, 2020
  • Hide protected files in Laravel September 21, 2020
  • Make a bootable pendrive in Linux September 10, 2020
  • Docker Commands July 3, 2020
  • Git Commands January 8, 2020

Contact Us

©2021 The Tech Paper | Powered by SuperbThemes & WordPress