redirect a page to an subdomain

Discussion in 'Apache' started by Mascka, Nov 26, 2008.

  1. #1
    I need something like this:

    h ttp:w ww.domain.com/cat/page1.html to be redirected 301 to
    h ttp: page1.domain.com

    please if you can help me. thanks

    i try a few methods but no results
     
    Mascka, Nov 26, 2008 IP
  2. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Feel free to add the code below to the .htaccess file in your public_html directory.
    RewriteEngine on
    redirect 301 /cat/page1.html [url]http://page1.domain.com[/url]
    Code (markup):
     
    Bagi Zoltán, Nov 28, 2008 IP