Redirecting folder to dummy domain.

Discussion in 'Site & Server Administration' started by muiomuio, Sep 17, 2009.

  1. #1
    This is a question that I have searched but all the subjects that I found are related to moving content but that's not exacly what I'm looking for.

    I have a blog that has a translator plugin that will add the translation language as a folder making the url like muiomuio.net/en/

    Is there anyway to when someone visits muiomuio.net/en/ will be redirected to en.muiomuio.net?

    The question is that the content is not on a different folder it's just translated. There is no "en" folder.

    is there a way to achieve this?
     
    muiomuio, Sep 17, 2009 IP
  2. killjoy

    killjoy Well-Known Member

    Messages:
    201
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    You using Apache/Linux? or Windows Server?
     
    killjoy, Sep 17, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(.*)muiomuio.net [NC]
    RewriteRule ^(.*)$ http://$1.muiomuio.net/ [R=301,L]

    use that .htaccess
     
    Bohra, Sep 17, 2009 IP