.htaccess on Plesk Linux or Windows

Asked

Viewed 116 times

0

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

*The site opens goes through index.php but when it is redirected to the login 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> 
  • Tell us in detail what you expect. Posting your code and saying it doesn’t work is very broad. Describe in detail what you expect and cite examples, otherwise your question will be marked with low quality and no one will be able to help you.

1 answer

1


You can use the comments and documentation of the configuration files without fear of making a mistake (unless it’s something 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>

Documentation mod_rewrite

Documentation on customization of error responses

  • Thank you very much !

Browser other questions tagged

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