annathepiper: (Default)
[personal profile] annathepiper
I need to tell Apache on newmoon to redirect all web hits over to lodestone--except that I want to allow any hits to newmoon that invoke the Mailman web UI to come on through.

I already have a RedirectMatch line that redirects anything of the form murkworks.net/~username. But I want to redirect anything in the Document Root, and NOT direct anything of the form murkworks.net/mailman/whatever.

Does anyone have any brilliant suggestions as to a regular expression I can feed the Apache config file to make it redirect anything that ISN'T murkworks.net/mailman/whatever? I tried a negative lookahead assertion, but when I try to restart apache, it bitches about not being able to compile the expression.

Date: 2004-09-12 12:46 pm (UTC)
From: [identity profile] fleetfootmike.livejournal.com
So, basically you want to redirect everything BUT /mailman/ ?

Wokay.

Try:

RewriteRule ^/mailman/ - [L]
RewriteRule ^(.*)$ http://lodestone.murkworks.net/$1 [R]

Date: 2004-09-12 12:52 pm (UTC)
From: [identity profile] fleetfootmike.livejournal.com
(of course, you need to load mod_rewrite and do
RewriteEngine On
too)

Date: 2004-09-12 01:11 pm (UTC)
From: [identity profile] fleetfootmike.livejournal.com
mod_rewrite is your friend :)

There is *so* much you can do with it, it's untrue. http://httpd.apache.org/docs/misc/rewriteguide.html for a few more scary examples.

Profile

annathepiper: (Default)
Anna the Piper

November 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 30th, 2026 04:40 am
Powered by Dreamwidth Studios