It is necessary, for example, that the list file is processed as PHP when loading. What to write in .htaccess ? Thank!

Maybe this should work?

RewriteEngine on RewriteRule \.()$ - [H=application/x-httpd-php]

Or

RewriteEngine on RewriteRule \.()$ - [T=application/x-httpd-php]

    3 answers 3

    Most likely you will be helped by the function of automatically setting the MIME type for those files for which it is not specified:

     DefaultType application/x-httpd-php 
    • That doesn't work either - Max Nest

    Using the RewriteRule directive

     RewriteEngine On RewriteRule ^list$ list.php [L] 
    • And so that all the files on the server that were processed without an extension? - Max Nest
    • It doesn't work for me ... RewriteEngine On RewriteRule ^ list $ /list.php [L] - Max Nest
    • @MaxNest Wrong, / put extra. It works for me, everything is ok. - Maxim Stepanov
    • Doesn't work anyway (( - Max Nest
    • @MaxNest is working for me. Maybe I misunderstood? I have a list.php file at the root of the site. With these rules, if you type ваш_сайт/list , the list.php file list.php and works correctly. I checked at home - everything is ok. Or do you have a list file without the .php extension? - Maxim Stepanov

    Try this :

     AddType application/x-httpd-php . 

    Guarantees that . will be perceived as an empty extension will not give. You go non-standard solutions, usually this is done as follows: create a directory of the list in which they put one file - index.php and calling the list page results in the default file being shown in the directory.

    • Doesn't work either - Max Nest