Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Rewriting Mailman URLs

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

  1. jimhermann

    jimhermann Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    62
    Likes Received:
    2
    Trophy Points:
    58
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice