Vobshchem the second day I vpuplyayu something and I can not force the Apache to turn his gaze to .htaccess.txt lying in the root What did you do:

  • Created the .htaccess.txt file. Its contents: AddDefaultCharset UTF-8 RewriteEngine on ErrorDocument 404 /404.html RewriteRule ^/pub/([0-9]+) /pub/?id=$1

  • Make sure that line 156 is uncommented in httpd.conf ( LoadModule rewrite_module modules/mod_rewrite.so )

  • Make sure that in lines 229, 265, 378 is AllowOverride All

At the same time, the site works as usual, does not produce any errors and does not redirect anywhere. What am I doing wrong?

  • one
    You did not try to remove .txt? rename file to .htaccess (without .txt) - Maqsood
  • @Maqsood .txt is not included in the name, it is an extension. - Diskyp
  • 2
    .htaccess servers is defined as an extension, and .txt as a simple text file, and is not processed. - Maqsood

1 answer 1

The fact is that the .txt format and it should not be! It should be only .htaccess but simply .htaccess notepad and other standard editor can not be created but you can create with the example using the Notepad ++ editor

  • Edrena louse, really. Earned! - Diskyp