.htaccess in Plesk Linux or Windows

1

My .htaccess file does not work, I saw this help link but how do I adjust it in my .htaccess?

* The site opens goes through index.php but when it is redirected to login it gives No input file specified

link here

<IfModule mod_rewrite.c>

RewriteEngine On
#RewriteBase /sma.loc/public_html/
RewriteCond $1 !^(index\.php|assets|install|update) 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# For godady Shared Hosting Server uncomment the line below
# RewriteRule ^(.*)$ index.php?/$1 [L]

# Please comment this if you have uncommented the above
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /theme/errors/html/error_404.php
</IfModule> 
    
asked by anonymous 11.08.2017 / 22:28

1 answer

1

You can use the comments and documentation of the configuration files without fear of error (unless it is very critical):

<IfModule mod_rewrite.c>
    # Em caso de erro 404, redireciona a requisição para seguinte página
    ErrorDocument 404 /theme/errors/html/error_404.php

    # Habilita mod_rewrite. Docs: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
    RewriteEngine On

    # Condições de reescrita de rota
    RewriteCond $1 !^(index\.php|assets|install|update) 
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Regra de reescrita de rota
    RewriteRule ^(.*)$ index.php?/$1 [NC,L,QSA]

</IfModule>

mod_rewrite documentation

Documentation about customizing error responses

    
12.08.2017 / 06:23