httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Posts" <po...@2-tiersoftware.com>
Subject RE: [users@httpd] JOB: rewrite expert needed
Date Thu, 27 Mar 2003 19:20:48 GMT
Hi, that won't work. I don't want to refresh the page because the
missing file could be an html file with images that are also not found.

Thanks,
Kawika


> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca] 
> Sent: Thursday, March 27, 2003 11:15 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] JOB: rewrite expert needed
> 
> 
> 
> On Thu, 27 Mar 2003, Posts wrote:
> 
> > Hi,
> >
> > I need to configure httpd.conf (apache 1.3.27) to redirect 
> all files 
> > not-found in any sub-directory to a php script in the root 
> directory. 
> > Here's some examples.
> >
> > All rewrite to this file: 
> > {http-host}/getfile.php?file={requested-filename}
> >
> > http://mydomain.com/foobar.pdf 
> <http://mydomain.com/foobar.pdf>  would 
> > rewrite to 
> http://mydomain.com/getfile.php?file=foobar.pdf
> > <http://mydomain.com/getfile.php?file=foobar.pdf>
> >
> > http://mydomain.com/somedir/foobar.pdf
> > <http://mydomain.com/somedir/foobar.pdf>  would rewrite to 
> > http://mydomain.com/getfile.php?file=/somedir/foobar.pdf
> > <http://mydomain.com/getfile.php?file=/somedir/foobar.pdf>
> 
> For this, I would use ErrorDocument and simply have the error 
> document php script look in the REDIRECT_REQUEST_URI (or 
> whatever) for the original URL.  No need to fool with mod_rewrite.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project. See 
> <URL:http://httpd.apache.org/userslist.html> for more info. 
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message