1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can you do this with .htaccess?

Discussion in 'Black Hat SEO' started by smartalex4, Jun 3, 2011.

  1. smartalex4

    smartalex4 Junior Member

    Joined:
    Jun 5, 2009
    Messages:
    163
    Likes Received:
    57
    Hello, I have a blog that I would like to split up...so basically I was wondering if I could 301 forward all my visitors to a certain category go to one url, while visitors for another category go to another url.

    For example:
    A visitors to sample.com/widgets/hex-widget will be forwarded to widgets.com/hex-widget

    Another visitor to sample.com/pons/brain-pons will be forwarded to pons.com/brain-pons

    And so forth...is this possible and if so anyone have any pointers on how I would go about doing it.

    Thanks in advance.
     
  2. thevil

    thevil Junior Member

    Joined:
    Aug 17, 2010
    Messages:
    190
    Likes Received:
    189
    Code:
    redirect 301 /widgets/hex-widget.htm http://widgets.com/hex-widget.htm
    
    For single files


    Directory
    Code:
    RedirectMatch 301 /widgets(.*) http://www.widgets.com/$1
    RedirectMatch 301 /pons(.*) http://www.widgets.com/$1
    
    Directory should do it
     
    • Thanks Thanks x 3
    Last edited: Jun 3, 2011
  3. 5VM5UN6

    5VM5UN6 Registered Member

    Joined:
    Jun 18, 2009
    Messages:
    51
    Likes Received:
    9
    Double slash?
    Code:
    RedirectMatch 301 /widgets/(.*) http://www.widgets.com/$1
    RedirectMatch 301 /pons/(.*) http://www.widgets.com/$1
    
     
  4. thevil

    thevil Junior Member

    Joined:
    Aug 17, 2010
    Messages:
    190
    Likes Received:
    189
    regex bro and NO, then it wouldnt work if someone typed widgets.com/pons