#5577548, By corimi Apache rewrite shenanigans

  • corimi 8 Dec 2009 11:18:52 1,310 posts
    Seen 7 years ago
    Registered 12 years ago
    Heh, I was attempting a similar thing last night, though I was just trying to remove a directory name from the URI. Didn't manage it though but it wasn't critical.

    In your case, would something like this work?
    RewriteCond %{HTTP_HOST} ^domain\.com/(*.)/appname
    RewriteRule ^/(.*)$/appname http://$1.domain.com/appname [L]

    Note: I am abysmal at regular expressions (and apache stuff in general), so that's likely to fail as well.

    This page seemed pretty good though if you haven't come across it:
Log in or register to reply