Forum Moderators: phranque
I have a website which uses rewrite for the main root path. E.g.,
http://example.com/xyz/
http://example.com/abc/
These are all rewritten. And this is working.
However, as with many cpanel installs, I have mailman working (the mailing list thing). The URL for this is usually:
http://example.com/mailman/admin/....
This above mailman bit is accomplished by the following line in httpd.conf as usual:
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
Given that I do want "example.com/mailman" to be left alone, I have the following internal rewrite rule in my httpd.conf VirtualHost directive for mysite:
RewriteRule ^/mailman/(.*)$ /mailman/$1 [L]
But this is not working. Shouldn't this code leave the "mailman" URL pattern alone? This is giving me a 404, because I of course do not have a subfolder in my public_html called "mailman".
So how can I make the ScriptAlias and the url rewrites play along together?
Thanks!
[edited by: jdMorgan at 12:49 pm (utc) on Sep. 19, 2007]
[edit reason] example.com [/edit]
Edit: I found this thread after some searching: [webmasterworld.com...]
Based on this example, I'm trying the following rule:
[quote]RewriteRule!^(mailman) - [F]
[/quote] But this started giving me 403 for all my conditions! The example uses the "RewriteCond" stuff, which I don't have. I have simple "RewriteRules". Is this why?
Would appreciate any pointers, thanks! What could this code be, and where should I put it? My rules currently look like this...
RewriteRule ^/abc$ /mysite/i.php?u=abc [L]
RewriteRule ^/123$ /mysite/n.php?u=123 [L]
...
What is the difference between mailman URLs you do want to rewrite or Alias to cgi-bin, and those that you don't want modified?
If the difference is that the ones you want sent to the cgi-bin directory all start /mailman/admin, and those that you don't want diverted are /mailman/<anything else or nothing>, then the problem lies with the ScriptAlias directive alone, and no other code is needed. Just use
ScriptAlias /mailman/admin /usr/local/cpanel/3rdparty/mailman/cgi-bin/admin
Jim