Artikel

Example: blocking access from some IP addresses

Sometimes it becomes necessary to block access to the site or part of it from certain IP...

Example: caching control

In order for the site to work as efficiently as possible, it is advisable to set the caching time...

Example: denying access to some files

Sometimes it becomes necessary to deny access to certain files. For example, to configuration...

Example: how to close a directory with a password

One of the standard tasks that can be solved by using .htaccess is restricting access to a...

Example: how to create a redirect

If you have 2 domains hosted (not necessarily on the same site) domain1.tld и domain2.tld, and...

Example: how to override the encoding of html documents

We want to “explain” to the web server that all HTML documents that are hosted on the server must...

Example: last-modified header

In some cases, it is required that the web server issues the Last-Modified HTTP header. For...

Example: redirection feature on synonyms

For example, there's a domain1.tld and synonym domain2.tld. If you request the address in the...

Index file

Индексный файл или файл-индекс — это тот файл, который открывается по умолчанию при обращении...

Own error pages 404, 403, and others

Sometimes web server visitors request pages that for some reason do not exist on the server:...

Purpose and use of the file .htaccess

The .htaccess file (note that the first character in the file name is a dot) is used to control...