Redirecting two domains to different directories

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AHG
    Member
    • Oct 2005
    • 44
    • 3.8.x

    Redirecting two domains to different directories

    Hi every one...

    I have two domains, www.domainone.com and www.domaintwo.com

    both of them is set as parked domain and I want to redirect visitors of www.domainone.com to www.domainone.com/stdir/index.html

    and www.domaintwo.com to www.domaintwo.com/nddir/index.html


    I tried to do that using .htaccess and wrote the command

    PHP Code:
    RedirectMatch permanent ^/$ 


    but the result is redirecting all visitors from both domains to the same directory!

    any one have clue on how to do that on .htaccess
  • Scott.Mc
    New Member
    • Feb 2007
    • 20

    #2
    Theres 2 ways , 1 is to unpark it and use make it point to a seperate directory and use the .htaccess there.

    The second would be to use rewrite conditionals so that if it's only domain one then it redirects.

    Comment

    • AHG
      Member
      • Oct 2005
      • 44
      • 3.8.x

      #3
      Thanks Scott.MC...

      Sounds great, can you please help on codes for the second way

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...