Subdomain redirect to category

Discussion in 'Apache' started by supriyadisw, Jan 22, 2008.

  1. #1
    supriyadisw, Jan 22, 2008 IP
  2. baumann93

    baumann93 Peon

    Messages:
    2,268
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This might work for you:

    
    RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.domain\.com.*$
    RewriteRule (.*) http://domain.com/category/$1 [L]
    
    Code (markup):
     
    baumann93, Jan 22, 2008 IP
  3. supriyadisw

    supriyadisw Peon

    Messages:
    203
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your reply. I will add this to wordpress that have a default .htaccess something like:
    I had tried to add that code, therefore:
    But it does not work. I'm sorry, I'm really a newbie here. Need help please...

    Many thanks...
     
    supriyadisw, Jan 22, 2008 IP
  4. baumann93

    baumann93 Peon

    Messages:
    2,268
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #4
    those are two separate rules, do not mix them up. place the code I gave you before the wordpress module.
     
    baumann93, Jan 22, 2008 IP
  5. supriyadisw

    supriyadisw Peon

    Messages:
    203
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks..

    So It should be:

    Right?
     
    supriyadisw, Jan 22, 2008 IP