What means this code on apache?

What means this code on apache?

<IfModule mod_php4.c>
 php_value engine off
</IfModule>
<IfModule mod_php5.c>
 php_value engine off
</IfModule>
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options-ExecCGI


And generally have an ordinary php programmer to know Apache directives? Or is it all usually copied from somewhere for each project?
March 12th 20 at 07:56
2 answers
March 12th 20 at 07:58
Solution
And generally have an ordinary php programmer to know Apache directives?
A very strange question. All of them should not know, but when needed, he should be able to open the documentation and read a couple of lines.

https://httpd.apache.org/docs/2.4/mod/core.html#if...
php.net/manual/ru/apache.configuration.php#ini.engine
Thank you. But you tell me, what does [NC] in this code?
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ <a href="http://%1/$1">http://%1/$1</a> [R=301,L]

AND [R=301,L]? 301 is a redirect, I understand. But L? How do these modifiers are called to Google about them? - enrico.Thompson3 commented on March 12th 20 at 08:01
https://httpd.apache.org/docs/2.4/rewrite/flags.html

The [L] flag causes mod_rewrite to stop processing the rule set. In most contexts, this means that if the rule matches, no further rules will be processed. This corresponds to the last command in Perl, or the break command in C. Use this flag to indicate that the current rule should be applied immediately without considering further rules.

Use of the [NC] flag causes the RewriteRule to be matched in a case-insensitive manner.

Translations can you Google yourself, but they are often incomplete
htaccess.net.ru/doc/mod_rewrite/RewriteRule.php - conner_Gorczany commented on March 12th 20 at 08:04
March 12th 20 at 08:00
for mod_php4.c and mod_php5.c disable the interpreter
what can you do? or not? - enrico.Thompson3 commented on March 12th 20 at 08:03
@enrico.Thompson3, gives what mod_php4.c and mod_php5.c will not process php files - citlalli_Schamberger commented on March 12th 20 at 08:06
@citlalli_Schamberger, and the code below what does it mean?
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options-ExecCGI
- enrico.Thompson3 commented on March 12th 20 at 08:09
@enrico.Thompson3, to allow execution of files .php .pl .py .jsp .asp .htm .shtml .sh .cgi )) - citlalli_Schamberger commented on March 12th 20 at 08:12
@enrico.Thompson3, generally this configuration stinks - citlalli_Schamberger commented on March 12th 20 at 08:15
@citlalli_Schamberger, in fact, there is minus, that is, the prohibition of the execution. Pretty useful feature, if it is assumed that the part of the developers - Nuba. - conner_Gorczany commented on March 12th 20 at 08:18

Find more questions by tags Apache