|
|

05-25-2009, 06:12 AM
|
|
Senior Member
|
|
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
|
|
FilesMatch & php .htaccess options
Hi!
We are experiencing an issue with the FilesMatch directive and the php_* htaccess options.
A client of ours is using BBClone to monitor his stats but after we switched to LS, the statistics parsing method stopped working. I've pinpointed the error to the .htaccess file he uses:
Code:
AddType application/x-httpd-php4 htm html
<FilesMatch "index.htm">
php_value auto_append_file "/var/www/vhosts/xxx/httpdocs/count.php"
</FilesMatch>
If I remove the FilesMatch directive, everything works fine, but with it on, the count.php file does not get appended!
Any help would be appreciated.
|

05-25-2009, 08:55 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
php_value inside <FilesMatch> was ignored.
You can download and try the latest 4.0.4 build, it should work now.
|

05-25-2009, 11:44 PM
|
|
Senior Member
|
|
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
|
|
|
Is it generally working now with directives like "FilesMatch", "Files" and "DirectoryMatch" and options php_flag, php_value, php_admin_flag, php_admin_value, or just FilesMatch and php_value?
Anyway, thanks for the quick response and fix!
|

05-27-2009, 12:39 PM
|
|
Senior Member
|
|
Join Date: Mar 2009
Posts: 149
|
|
|
Thank you for thread starter.
I am also have a question regarding to .htaccess
Cpanel always create rewrite rules just like this :
-----------------------------------------------
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^.?$ "http\:\/\/domain\.com\/folder" [R=302,L]
-----------------------------------------------
That default Cpanel rules are often (always) makes browser bring Redirect loop error reports with LSWS.
So I have to always manually edit/simply modify that rules to :
-----------------------------------------------
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^/?$ "http\:\/\/domain\.com\/folder" [R=302,L]
-----------------------------------------------
That will work fine with LSWS.
So the question is :
How to make LSWS automatically work with default Cpanel redirect rules?
Because it is so wasting time to manualy edit so many .htaccess, which suppose to be just worked at a time after created from Cpanel.
Thank you.
|

05-27-2009, 02:01 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
How do you make cPanel create rule like that?
The default rule does not look right, as it redirects request with "domain.com" to http://domain.com/, so it causes loop redirections.
I don't know why Apache does not cause loop redirection with it.
We need to investigate.
|

05-27-2009, 02:17 PM
|
|
Senior Member
|
|
Join Date: Mar 2009
Posts: 149
|
|
|
I don't know how, but Cpanel is always create rules just like that when creating redirect from Cpanel's redirect menu.
The situation is the same way either with old or new hosting account.
Redirect domain/subdomain/folder to another url will causing redirect loop.
So everytime after setuping redirect from Cpanel's menu, I have to replace "." with "/" by my self.
Any clue?
Or I have to PM my temporary root detail to you so you could investigate this?
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 06:59 PM.
|
|