this is what i have added in the end of httpd.conf:
####################### Proxy config start #########################
<Directory />
RewriteEngine on
RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)?(.*)$ cache/index.php?folder=$1$2 [L,QSA]
</Directory>
####################### Cache config start #########################
##LoadModule cache_module modules/mod_cache.so
<IfModule cache_module>
##gfhfhfgdgfh
### LoadModule disk_cache_module modules/mod_disk_cache.so
CacheIgnoreCacheControl On
CacheIgnoreNoLastMod On
CacheDefaultExpire 86400
# If you want to use mod_disk_cache instead of mod_mem_cache,
# uncomment the line above and comment out the LoadModule line below.
########### <IfModule mod_disk_cache.c>
########### CacheEnable disk /
########### CacheRoot "/var/cache/mod_proxy"
########### </IfModule>
## disk_cache_module
<IfModule mod_disk_cache.c>
##CacheRoot c:/cacheroot
##CacheRoot "/var/spool/httpd/cache"
##CacheRoot /cache2/
CacheRoot "/var/cache/mod_proxy"
CacheEnable disk /cache/
#CacheSize 5000000
#CacheExpiryCheck Off
#####CacheEnable disk /plugins/cache/
##CacheDirLevels 5
##CacheDirLength 3
</IfModule>
##LoadModule mem_cache_module modules/mod_mem_cache.so
######## <IfModule mod_mem_cache_xxx>
######## ##CacheEnable mem /
######## CacheEnable mem /plugins/
######## MCacheSize 4096
######## MCacheMaxObjectCount 100
######## MCacheMinObjectSize 1
######## MCacheMaxObjectSize 2048
######## </IfModule>
# When acting as a proxy, don't cache the list of security updates
##CacheDisable
http://security.update.server/update-list/
</IfModule>
####################### cache config ends #########################
and that is my index.php that rewrites the request:
<?
//phpinfo();die;
/* show error in case you get a blank page*/
ini_set("display_errors","2");
ERROR_REPORTING(E_ALL);
/* show errors end*/
/* Code for Cache: start (Important for Cache) */
header( 'Expires: Mon, 26 Jul 2020 05:00:00 GMT' );
//header( 'Last-Modified: Mon, 02 Feb 2000 13:56:55 GMT' );
header( 'Last-Modified: Mon, 02 Feb 2000 13:56:55 GMT' );
header( 'Cache-Control: public' );
header( 'Pragma: cache' );
/* Code for Cache: ends */
// $server is the parameter for the gis server location (glass fish)
$servers = array();
$servers[] = "http://IP_ADRESS:3080/";
//$servers[] = "http://localhost:8080/";
$server = $servers[array_rand($servers)];
//$server = "http://localhost:8080/";
// Put the query string in $qs
$qs = $_SERVER["QUERY_STRING"];
// $folder: this parameter is coming from apache i.e.
http://xyz.com/?QUERY_STRING ->
$folder = $_GET["folder"];
// This line removes var and www and html from $folder
$folder = preg_replace("/var\/www\/web\//","",$folder);
// $new_request will be the call (i.e. in glass fish server) to make
// this is a assamble of the server name + target folder + and query string
$new_request = $server . $folder . "?" . $qs;
// convert the page to an xml result page
header ("content-type: image/jpeg");
// get the new call content and print it
echo file_get_contents ($new_request);
?>
line 44 is the last line
any suggestions to solve my problem?