Redirection rules and other settings configured in the .htaccess file do not work on a website in Plesk for Linux

Follow

Comments

8 comments

  • Avatar
    Matthias Ulewicz

    Hi, 

    Mention only about adding these attributes.

    exemple: 

    Options +FollowSymLinks
    RewriteEngine On

    ErrorDocument 404 /error/404.htm
    ErrorDocument 500 /error/500.htm

     

    1
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Matthias Ulewicz

    Sorry for the late response but could you, please, clarify your request?

    If you need to convert the mentioned directives, try using the extension mentioned in this article.

    0
    Comment actions Permalink
  • Avatar
    Alejandro Hernandez

    Hi Everyone

    I have a problem with the htaccess. The main concern is, when Im using the preview website, the htaccess works, but as soon im using the real domain it's not.

    do you have any clue?

    0
    Comment actions Permalink
  • Avatar
    Martin Corby

    I have tried checking the tick box in nginx settings to enable proxy mode but this didn't help. 
    Tried the htaccess to nginx converter but the server didn't like the code produced.
    Any suggestions ?

     

    0
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello, Martin Corby

    I would recommend checking if the rewrite module is enabled:

    # plesk bin apache --status | grep rewrite

    In case the command will return "rewrite       off", execute this one to enable the module:

    # plesk bin apache --enable-module rewrite

     

     

    0
    Comment actions Permalink
  • Avatar
    Martin Corby

    Stefan - Thanks for your time.

    Checked the above and the server responded : rewrite on

     

    0
    Comment actions Permalink
  • Avatar
    Ehud Ziegelman (Edited )

    Hi Stefan Yakubov ,


    This seems to me as a possible ill design code, involving a possible Plesk Bug.

    The proxy is enabled on our server, yet, such bypassing of filters happens.

    It seems to me, the 'server' directive 301 routing supersede some filters although they should not.

    A log showing to where is the 301 routing pointing, when a filter (403?) was expected, could be very helpful.

    0
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello, Ehud Ziegelman

    Considering the fact that the .htaccess is created rather manually, or by the application, it is outside of the Plesk logic, and thus cannot be considered  a bug, when proxy mode in Plesk is disabled.

    You can create a uservoice request, for example, a feature that will notify the user during the proxy mode disabling, that there are .htaccess files within the domain's document root.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request