I want to selectively rewrite null uri's in Apache based in ONE of my
name based virtual hosts.

I've tried a few variations of this:

<VirtualHost *>
        ServerAdmin [EMAIL PROTECTED]
        ServerName www.mercuryspacecraft.com
        DocumentRoot /var/www/html
        RewriteEngine on

        RewriteRule index.html$ /wiki/Main_Page [R]

        # Rewrite any article as wiki/index.php/article and stop
        RewriteRule ^/wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]

</VirtualHost>

The second RewriteRule works fine, it's the first one I'm having trouble with.
I've also tried

      RewriteRule ^$ /wiki/Main_Page [R]

The desired effect is for http://www.mercuryspacecraft.com
or http://www.mercuryspacecraft.com/ to get rewritten (and displayed
to the client) as http://www.mercuryspacecraft.com/wiki/Main_Page
which in turn gets rewritten internally to
http://www.mercuryspacecraft.com/w/index.php?title=Main_Page

If I browse http://www.mercuryspacecraft.com/Main_Page, the second
rewrite works fine, but the empty uri cases serve up
/var/www/html/index.html  which I DON'T want for this server name.

In fact I'm not sure now just how I'm getting http://anyserver/ to
resolve to index.html

mod_rewrite makes my head spin every time I play with it, or should I
say it plays with me.
--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

Reply via email to