httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Ice <>
Subject [users@httpd] mod_rewrite and caching?
Date Fri, 14 Feb 2003 15:55:26 GMT
I'm attempting to use mod_rewrite on my site to make "deep linking" 
frames friendly.  It works AOK with Netscape(7), but not so with IE...I 
suspect there's some caching involved, but I can't figure out how to fix 
it.  Hoping someone can help.

My site uses frames to separate navigation and content (pls. no flames 
re. frames):


Here you get a static frameset document which loads up stuff.

If I attempt to "deep link" into the site, however, I want to keep the let's say I email a url to someone, or they link in from a 
search engine:


[ try it in works.  try it in don't :p ]

Here's what I'm doing:

mod_rewrite looks for the presense of http_referer.  If there is none, 
we assume that someone is "deep linking" in.  So, we rewrite the URL to 
a cgi, and append their requested URI as an argument to the cgi.

This cgi then spits out the frameset, but with the source of the content 
frame equal to the URI they asked for.  Maybe clearer below:

Options       ExecCGI FollowSymLinks Includes MultiViews
RewriteEngine on
RewriteOptions inherit
RewriteBase /
RewriteCond %{HTTP_REFERER} !^.**
RewriteCond %{REQUEST_URI} !^/menu/.+
RewriteRule (^.+/.*) /index.cgi?$1 [,NE,NS,L]

But here's what I think is tripping up IE.  When it asks for 
/cars/lancia/, it gets back a frames doc, one frame of which is src'ed 
to /cars/lancia/ again.  But IE knows it just asked for that, got back a 
frameset, so just punts and displays <HTML></HTML>.

I know this is probably wildly complicated to troubleshoot by 
email...but my question is this:

a) Could this be a case of IE trying to be too smart about caching requests?

b) If so, is there some non-horrible way to tell IE to just not cache?

I considered using a hard redirect, but that drops the URI arg to the 
cgi (I think) so the frameset cgi won't get what/where/how to set the 
body frame.

Chris Ice            "Gentlemen!  There is no fighting in here..." "...this is the war room!" - Pres. Merkin Muffley

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message