httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] rewrite and +MultiViews on the root file (index.php)
Date Sun, 27 Jul 2003 14:54:57 GMT

On Sun, 27 Jul 2003, Justin French wrote:
> I've got this working fine, but now I'm hoping to take it one step
> further.  I'd like everything to run through one "fusebox" script
> (index.php) transparently.  In other words, I can get this to work:
> >
> but can't get index.php to work transparently:
> >
> Is this possible?

One easy way to do this is to simply point
ErrorDocument 404 /index.php
and look in the REDIRECT_* variables.
But this has some negative consequences (possible extra filesystem
lookups, etc).

The main complication in this is that you probably have one requirement
you haven't mentioned: you proabably want to serve images and other static
files from the server as well.  Then the question becomes: how can you
distinguish between requests that should go to the script, and requests
that should go to the filesystem.  Once you answer that, the answer should
be easy.

As an example, the following should direct everything to the script,
except requests that have a last component ending with an extension (eg.

RewriteEngine On
RewriteCond %{REQUEST_URI} !.*/[^/]*\.[^/]*$
RewriteRule (.*) /index.php/$1

If you really meant that you want EVERYTHING to go to the script, then the
asnwer is really easy:

Alias / /full/unix/path/to/index.php


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