What language is used in the Apache ". htaccess" file?

Asked

Viewed 411 times

5

For example the following lines represent which language :

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?uri_path=$1
  • 1

    Second: http://stackoverflow.com/questions/12064504/what-language-are-apache-htaccess-files-written-in There is no specific name for the syntax as a whole, but they are called Directives.

  • .htaccess is a configuration file for use on web servers running Apache web server software. When a file . htaccess is placed in a directory that is in turn "uploaded through Apache Web Server", then the file . htaccess is detected and run by Apache Web Server software. http://www.htaccess-guide.com/

1 answer

7


In a nutshell, it is a specific "language" for configuring Apache that does not have an explicit name in the documentation, nor is it restricted to .htaccess.

It is a collection of directives which largely equate to the Apache HTTP Server configuration parameters, and the syntax is specifically tied to this.

As stated in the Apache manual, in the directives:

They are described using a consistent format, and there is a Dictionary of the Terms used in their descriptions available.

That is to say:

They are described using a consistent format, and there is a dictionary of terms used in their descriptions.

At no point is a specific name given for this, everything is treated generically as a directive.


The .htaccess is an extension of the settings, and it exists to be a facilitator in the sense that you can change specific parameters in different directories without even needing access to the general configuration.

Yet, in the manual:

In general, . htaccess files use the same syntax as the main configuration files.


Specifically on the example given in the question, these are the directives of the mod_rewrite, and in this case are used RegExes, that is to say, Regular Expressions (more specifically PCRE) in certain parameters.

Links of interest:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.