View Single Post
  #25  
Old 01-26-2011, 06:14 AM
eva2000 eva2000 is offline
Senior Member
 
Join Date: Dec 2004
Location: Brisbane, Australia
Posts: 142
Okay as NiteWave requested i tried removing CacheRoot /lscache/ from httpd.conf and only use litespeed admin console set /lscache for cache path and now ndex.php isn't cached but test.php is still cached.

logged out of forums with cookies deleted

index.php firefox firebug reported headers for

index.php

Code:
Content-Encoding	gzip
Vary	Accept-Encoding
Transfer-Encoding	chunked
Date	Wed, 26 Jan 2011 14:02:32 GMT
Server	LiteSpeed
Connection	Keep-Alive
Keep-Alive	timeout=5, max=100
X-Powered-By	PHP/5.3.5
Content-Type	text/html; charset=ISO-8859-1
Cache-Control	private
Pragma	private
Set-Cookie	zzlastactivity=0; expires=Thu, 26-Jan-2012 14:02:32 GMT; path=/ zzimloggedin=deleted; expires=Tue, 26-Jan-2010 14:02:31 GMT; path=/

for test.php

Code:
Content-Encoding	gzip
Vary	Accept-Encoding
Date	Wed, 26 Jan 2011 14:27:05 GMT
Server	LiteSpeed
Connection	Keep-Alive
Keep-Alive	timeout=5, max=100
X-LiteSpeed-Cache	hit
Content-Length	79
X-Powered-By	PHP/5.3.5
CurrentTime	Wed, 26 Jan 2011 14:26:59 GMT
Content-Type	text/html; charset=UTF-8
headers reported from curl in ssh

Code:
curl -I 192.168.56.101/index.php
HTTP/1.1 200 OK
Date: Wed, 26 Jan 2011 14:01:51 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
X-Powered-By: PHP/5.3.5
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: private
Pragma: private
Set-Cookie: zzlastvisit=1296050511; expires=Thu, 26-Jan-2012 14:01:51 GMT; path=/
Set-Cookie: zzlastactivity=0; expires=Thu, 26-Jan-2012 14:01:51 GMT; path=/
Set-Cookie: zzimloggedin=deleted; expires=Tue, 26-Jan-2010 14:01:50 GMT; path=/
Code:
curl -I 192.168.56.101/test.php
HTTP/1.1 200 OK
Date: Wed, 26 Jan 2011 14:27:37 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
Transfer-Encoding: chunked
X-LiteSpeed-Cache: hit
X-Powered-By: PHP/5.3.5
CurrentTime: Wed, 26 Jan 2011 14:26:59 GMT
Content-Type: text/html; charset=UTF-8
and .htaccess used

Code:
RewriteEngine on

RewriteRule test.php - [E=Cache-Control:max-age=45]
RewriteRule hello.php - [E=Cache-Control:max-age=45]

#RewriteCond %{HTTP_HOST} !^www\.domain\.com$
#RewriteRule /forum/(.*)$ http://www.domain.com/forum/$1 [R=301,L]

RewriteCond %{HTTP_COOKIE} !zzimloggedin=yes
RewriteCond %{HTTP_COOKIE} !zzuserid=
RewriteCond %{HTTP_COOKIE} !zzpassword=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
RewriteCond %{REQUEST_URI} !^/admincp
RewriteRule /(.*\.php)?$ - [L,E=Cache-Control:max-age=120]
cache empty for index.php tests
Code:
[root@localhost html]# ls -alhR /lscache
/lscache:
total 12K
drwxrwxrwx  2 nobody nobody 4.0K Jan 25 00:09 .
drwxr-xr-x 28 root   root   4.0K Jan 26 23:28 ..
headers when logged into index.php

from browser

Code:
Content-Encoding	gzip
Vary	Accept-Encoding
Transfer-Encoding	chunked
Date	Wed, 26 Jan 2011 14:09:18 GMT
Server	LiteSpeed
Connection	Keep-Alive
Keep-Alive	timeout=5, max=100
X-Powered-By	PHP/5.3.5
Content-Type	text/html; charset=ISO-8859-1
Cache-Control	private
Pragma	private
Set-Cookie	zzimloggedin=yes; path=/; HttpOnly
where do you enable rewrite logging ? the server logs have something though

Code:
2011-01-26 23:49:47.363	ERROR	[[HTAccess]] rewrite: '[' is expected while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
2011-01-26 23:49:47.363	ERROR	[[HTAccess]] rewrite: invalid rewrite condition while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
2011-01-26 23:57:17.880	INFO	[HTAccess] Updating configuration from [/var/www/html/.htaccess]
2011-01-26 23:57:17.892	ERROR	[[HTAccess]] rewrite: '[' is expected while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
2011-01-26 23:57:17.892	ERROR	[[HTAccess]] rewrite: invalid rewrite condition while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$

Last edited by eva2000; 01-26-2011 at 06:30 AM..
Reply With Quote