.htAccess

Httpd.conf.

LoadModule rewrite_module modules/mod_rewrite.so.

<Directory>

Options FollowSymLinks.

AllowOverride None.

</Directory>

Rename .htaccess.

AccessFileName [filename].

.htaccess.

Turn on rewrite engine

RewriteEngine On.

RewriteBase /.

ForceType

Application/x-httpd-html.

DefaultType

Text/html.

  • Non Extension files.

ErrorDocument

404.

/<path from documentRoot>
url <http://_>
url "<string>"

(default).

Redirect 404 /

Redirects 404 errors to page.

Default file

Default file DirectoryIndex <path>

Variables

%{QUERY_STRING}
%{REQUEST_FILENAME}

Path of the file invoked to serve the request.

%{DOCUMENT_ROOT}
Updated: 2026 Aug 19