.hataccess

Discussion in 'Programming' started by pedrodri, Nov 27, 2006.

  1. #1
    Hi people! Please help me!

    I have one site and wanted to redirect all the directories for the other site root, except one, /blog/. For example:

    www.mysite.com/xyz - redirect to www.othersite.com
    www.mysite.com/aaa - redirect to www.othersite.com

    www.mysite.com/blog - not redirect

    Can help me?

    Thanks and sorry for my English!
     
    pedrodri, Nov 27, 2006 IP
  2. themaster

    themaster Well-Known Member

    Messages:
    934
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    140
    #2
    themaster, Nov 27, 2006 IP
  3. pedrodri

    pedrodri Peon

    Messages:
    163
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the reply...


    But is possible redirect all links? For example:

    www.mysite.com/ngjsfbd/
    www.mysite.com/all/
    www.mysite.com/....

    less www.mysite.com/blog/ -> no redirect

    Can help me?
     
    pedrodri, Nov 27, 2006 IP
  4. vid

    vid Peon

    Messages:
    209
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Does it Apache .htaacess file ? If so then go to www.apache.org theres is a lot of information "how to congigure it"

    regards,
     
    vid, Nov 27, 2006 IP
  5. Dimma

    Dimma Well-Known Member

    Messages:
    631
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    140
    #5
    RewriteEngine on
    RewriteBase /
    
    RewriteRule ^xyz/(.*)$ [url]http://www.othersite.com/[/url]           [R=302]
    RewriteRule ^all/(.*)$ [url]http://www.othersite.com/[/url]             [R=302]
    ...........................
    Code (markup):
     
    Dimma, Dec 4, 2006 IP