Dynamic subdomains in htaccess using multiple parameters

Discussion in 'Apache' started by meetzah, Aug 15, 2011.

  1. #1
    Hello.

    This is my first post here and I thank you in advance for your help. There are 3 day since I try to make this but I can't see the end of it:

    I managed to generate this url aaa.adresa.com which display the content from adresa.com/fisier.php?link=aaa. For that, I used this code:

    RewriteCond %{HTTP_HOST} !^www\.adresa\.com
    RewriteCond %{HTTP_HOST} ([^.]+)\.adresa\.com [NC]
    RewriteCond %{REQUEST_URI} !^/fisier\.php$
    RewriteCond %{QUERY_STRING} !^link=.
    RewriteRule (.*) /fisier.php?link=%1 [QSA,L] 
    Code (markup):
    Further, I need to get this address:
    aaa.adresa.com/bbb to display the content of adresa.com/fisier.php?link=aaa&parametru=bbb


    Thank you for your help.
     
    meetzah, Aug 15, 2011 IP
  2. federal

    federal Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is my question too.
     
    federal, Sep 9, 2011 IP