RedirectMatch gone instruction

Discussion in 'Bug Reports' started by [QT]bender, Feb 18, 2009.

  1. [QT]bender

    [QT]bender New Member

    The following rules does not work at Litespeed:

    RedirectMatch gone ^.*\.(sql|log|conf)$
    RedirectMatch gone VERSION.*

    Is it a bug or should we use different constructions(as far as I know these rules works just fine in the Apache)?
  2. mistwang

    mistwang LiteSpeed Staff

    Where did you put those configuration?
    It works in a .htaccess in our lab.
    Need more detail to reproduce the problem.
  3. kas

    kas New Member

    As it was mentioned by bender there is a bug. Redirect gone VERSION.* and RedirectMatch gone VERSION.* expressions in the .htaccess causes infinite redirect loop.

    I have commented these rules out and now it is ok. But we need a solution.
  4. kas

    kas New Member

    Here is the Web Server error log:

    I have replaced the actual server path with /%PATH%/.

    And here is some rules from the .htaccess:

  5. mistwang

    mistwang LiteSpeed Staff

    Please send the whole .htaccess file to bug (at) litespeed ... along with the request URL causing the infinite redirect loop.
  6. mistwang

    mistwang LiteSpeed Staff

    What should this directive do?
    To me, it should have no effect as there is no target URL specified.
  7. kas

    kas New Member

    Never mind.

    I have found the issue. The redirect loop was caused by the following configuration file:

    /etc/httpd/conf.d/zzz_php_openbasedir.conf:
    I had to comment out the DirectoryMatch braces and currently our server works fine.

    So in the result is:

    /etc/httpd/conf.d/zzz_php_openbasedir.conf:
    Please, let me know the cause of this issue. Your attention is appreciated.
  8. kas

    kas New Member

    Any update?

    We need a solution and very unhappy with this situation. And as an addition I want to mention that construction does not work at all:

    Looking forward to your reply.
  9. kas

    kas New Member

    I have been waiting for at least 12 hours and I haven't got any response from you guys.

    We have a lot of complaint from our customers! It is very disappointing thing!
  10. kas

    kas New Member

    An as addition I want to say that we are extremely loosing our sales!

    Currently we are considering an opportunity to choose another Web Server solution because of huge delays and troubles. I wonder that a simple configuration construction causes a huge problems!
  11. mistwang

    mistwang LiteSpeed Staff

    LiteSpeed pre-compile <location...> <Directory...> directives, this <directoryMatch ...> directive is intended to match document root directory of all web sites, so it will match all requests and causes other "...Match" directives being ignored as LiteSpeed always use the first match.

    The solution is to treat this as a special case in LiteSpeed.

    Are you using plesk? Which version?
    Does /etc/httpd/conf.d/zzz_php_openbasedir.conf belong to the default template? or added manually?

    Does your patch to <DirectoryMatch...> configuration work or not?
  12. mistwang

    mistwang LiteSpeed Staff

    The latest 4.0rc1 build should be able to take care of the <DirectoryMatch...> configuration.
  13. [QT]bender

    [QT]bender New Member

    Configuration file '/etc/httpd/conf.d/zzz_php_openbasedir.conf' was created manually to disable 'open_basedir'. Yes we have using Plesk(different version of branch 8).

    Yes, these configuration lines works, but if someone use RedirectMatch in his webroot he'll receive Internal server error.
  14. kas

    kas New Member

    It causes a permanent redirection with adding two slashes to all URLs except matched files by the Redirect and RedirectMatch directives.

    I have not seen the 'Internal Server Error'. Please, hurry up with the fix or any solution.
  15. mistwang

    mistwang LiteSpeed Staff

    fix is in latest 4.0rc1 build.
  16. kas

    kas New Member

    Thank you for the reply. I have another one question. Is there any way to set the separate php.ini file for each user?

    For example:
    We have the alternative php.ini file in the conf directory of the domain, like this:

    [09:07:08][root@sg:/var/www/vhosts/somedomain/conf]# ls -la /var/www/vhosts/somedomain/conf/php.ini
    -rw-r--r-- 1 root root 39455 Feb 25 09:00 /var/www/vhosts/somedomain/conf/php.ini

    How to force litespeed to use this php.ini file?

    Looking forward to your reply.
  17. kas

    kas New Member

    Where are you, guys? I've waited for your reply a least 2 days and got no answer from you.

    Could you, please, answer my question?

    I realy need a solution.
  18. mistwang

    mistwang LiteSpeed Staff

    it is not possible when LSWS read Apache httpd.conf.
    Only when you using LSWS vhost template you can do that.
  19. kas

    kas New Member

    This was not fixed even in 4.0 Ent.

    Please, help.

Share This Page