Redirect/Rewrite help for subdomain.

Discussion in 'Apache' started by mgrohan, Jan 7, 2008.

  1. #1
    Have tried everything i could find put can't get this working.

    i have a sub domain xxx.mysite.com and i want to move that entire subdomain to a new website.
    I want all pages from the subdomain xxx.mysite.com to go instead to a single page on the new website.

    so all pages from xxx.mysite.com/ go to mynewsite/newindex.php

    Please can someone help out, i've tried everything with no luck!
     
    mgrohan, Jan 7, 2008 IP
  2. infogle

    infogle Prominent Member

    Messages:
    2,732
    Likes Received:
    128
    Best Answers:
    1
    Trophy Points:
    300
    #2
    if you are using cpanel its easier to do from there...

    just go to Cpanel >> Subdomains >> choose the option to redirect...

    hope it helps...
     
    infogle, Jan 7, 2008 IP
  3. mgrohan

    mgrohan Active Member

    Messages:
    671
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I realized i was making a mistake trying to use the main site .htaccess instead of the subdomain .htaccess :eek:

    Got it working now :) with:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} xxx\.mysite\.com
    RewriteRule ^(.*) http://www.mynewsite.com/newindex.php$1
     
    mgrohan, Jan 7, 2008 IP