The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Rewriting Mailman URLs

Discussion in 'E-mail Discussions' started by jimhermann, Jul 12, 2011.

  1. jimhermann

    jimhermann Active Member

    Joined:
    Jan 20, 2008
    Messages:
    42
    Likes Received:
    1
    Trophy Points:
    8
    Rewriting Gurus,

    I want to rewrite any Mailman URL that does not contain an underline, so that:

    http://domain-name/mailman/script-name/list-name

    is rewritten as

    http://domain-name/mailman/script-name_domain-name

    I almost have the solution but it fails for URL http://domain-name/mailman/script-name (e.g. http://domain-name/mailman/listinfo)

    Here is the .htaccess file that I saved to the mailman cgi-bin directory:

    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^(.*)$ [NC]
    RewriteRule ^(.*)_(.*)$ - [L]

    RewriteCond %{HTTP_HOST} ^(.*)$ [NC]
    RewriteRule ^(.*)$ http://%1/mailman/$1_%1 [R=301,L]


    These Rewriting rules fail for http://domain-name/mailman/listinfo

    Any suggestions?

    Thanks.

    Jim
     
Loading...

Share This Page