RewriteRule for subdomains

Discussion in 'Apache' started by myflashstore, Nov 8, 2009.

  1. #1
    Hi,

    I have a website myflashstore.net which has a social network on it. To access each individual profile you need to goto myflashstore.net/jomsocial/username/profile

    I want my users to be able to access their profile using the address members.myflashstore.net/username

    I'm trying to achieve this using RewriteRule but i'm getting an internal server error. Can anyone tell me what i'm doing wrong.

    RewriteCond %{HTTP_HOST} ^members.myflashstore.net$
    RewriteRule ^(.*)$ jomsocial/$1/profile [QSA]
    Code (markup):
    Please note I have already created the members.myflashstore.net subdomain which points to the root web directory.

    Thanks
     
    myflashstore, Nov 8, 2009 IP
  2. myflashstore

    myflashstore Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok so I have sorted it out now, but it's actually a redirection, is there any way to have it so it doesn't redirect? This is my code; Thanks


    RewriteCond %{HTTP_HOST} ^members.myflashstore.net [NC]
    RewriteRule ^(.*)$ http://www.myflashstore.net/c/$1/profile
    Code (markup):
     
    myflashstore, Nov 9, 2009 IP