|
|

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,589
|
|
|
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,589
|
|
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?
|

05-27-2009, 07:13 PM
|
|
Senior Member
|
|
Join Date: Mar 2009
Posts: 149
|
|
Ramdomly redirect loop victim --> http://audiogazmo.com
Even mysql.allow persistent turned Off on php ini.
The .htaccess :
-----------------------------------------------
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
-----------------------------------------------
The error log from Cpanel :
-----------------------------------------------
2009-05-28 08:58:44.888 [INFO] [HTAccess] Updating configuration from [/home1/audiocom/public_html/.htaccess]
2009-05-28 08:52:28.582 [INFO] [HTAccess] Updating configuration from [/home1/audiocom/public_html/.htaccess]
2009-05-28 08:50:40.281 [INFO] [HTAccess] Updating configuration from [/home1/audiocom/public_html/.htaccess]
-----------------------------------------------
Everyday, twice or more, any of my customers report that their websites cannot open because of Redirect Loop.
I'm so tired with this many ways of Redirect Loop problems...
Last edited by DraCoola; 05-27-2009 at 07:33 PM..
|

05-27-2009, 09:46 PM
|
|
Senior Member
|
|
Join Date: Dec 2008
Posts: 133
|
|
With wordpress the cause is far more likely in wordpress they have it set to www.audiogazmo.com and the htaccess to audiogazmo.com then you create a loop.
Maybe not in this case but a lot of the time thats the issue with wordpress.
|

05-27-2009, 10:33 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,589
|
|
Quote:
Originally Posted by DraCoola
So everytime after setuping redirect from Cpanel's menu, I have to replace "." with "/" by my self.
|
Do you mean "Redirects" function in the "domains" section? Or something else?
|

05-28-2009, 12:59 PM
|
|
Senior Member
|
|
Join Date: Mar 2009
Posts: 149
|
|
Quote:
Originally Posted by mistwang
Do you mean "Redirects" function in the "domains" section? Or something else?
|
Yes, I mean creating redirects from "Redirects" function in the "domains" section

|
| Thread Tools |
|
|
| Display Modes |
Linear 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 02:13 PM.
|
|