httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From darren chamberlain <>
Subject Re: Rewrite Problem
Date Mon, 17 Dec 2001 16:41:38 GMT
Alek Andreev <> said something to this effect on 12/15/2001:
> Hi!
> I am having a problem with mod_rewrite on Apache 1.3. I have configured
> rewrite so that if a user request a page that does not exist, the request is
> forwarded to a PHP script. So, if I request /non/existent/file, the server
> will call index.php?p=/non/existent/file. This works fine, still I would
> also like to be able to do the same in SSI files (<!--#include
> virtual="/non/existent/file" -->), but the server gives me an SSI error
> because the file does not exist. How can I fix that?
> PS I tried the same with a 404 handler, still did not work.

What does your RewriteRule look like?  If you aren't doing
something like:

  RewriteEngine on
  RewriteCond   /your/docroot/%{REQUEST_FILENAME} !-f
  RewriteRule   ^(.+) http://%{SERVER_NAME}/index.php?p=$1

This should be caught by subrequests, so it should work with
server-parsed files as well as directly requested files.


The kind of thinking we do sets the stage for the action we are likely
to take. Because of this, a man who refuses to develop his thinking
is likely to act on the impressions made upon him by others.
    -- Dr. Claude R. Baker, "Coin In The Air"

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

View raw message