LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > FilesMatch & php .htaccess options

Reply
 
Thread Tools Display Modes
  #1  
Old 05-25-2009, 06:12 AM
priestjim priestjim is offline
Senior Member
 
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
Default 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.
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote
  #2  
Old 05-25-2009, 08:55 PM
mistwang mistwang is offline
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.
Reply With Quote
  #3  
Old 05-25-2009, 11:44 PM
priestjim priestjim is offline
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!
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote
  #4  
Old 05-27-2009, 12:39 PM
DraCoola DraCoola is offline
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.
Reply With Quote
  #5  
Old 05-27-2009, 02:01 PM
mistwang mistwang is offline
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.
Reply With Quote
  #6  
Old 05-27-2009, 02:17 PM
DraCoola DraCoola is offline
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?
Reply With Quote
  #7  
Old 05-27-2009, 07:13 PM
DraCoola DraCoola is offline
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..
Reply With Quote
  #8  
Old 05-27-2009, 09:46 PM
Tony Tony is offline
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.
__________________
Hawk Host
Frog Host
Reply With Quote
  #9  
Old 05-27-2009, 10:33 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,589
Quote:
Originally Posted by DraCoola View Post
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?
Reply With Quote
  #10  
Old 05-28-2009, 12:59 PM
DraCoola DraCoola is offline
Senior Member
 
Join Date: Mar 2009
Posts: 149
Quote:
Originally Posted by mistwang View Post
Do you mean "Redirects" function in the "domains" section? Or something else?
Yes, I mean creating redirects from "Redirects" function in the "domains" section

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:13 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.