1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Redirect individual pages

Discussion in 'Apache' started by clay15, Oct 13, 2005.

  1. #1
    I have done a 301 redirect from one subdomain to another (www.domain.com to www2.domain.com)
    The problem I have is that the individual pages of the old subdomain are all redirected to the homepage of the new subdomain (www.domain.com/page1.php goes to www2.subdomain.com)

    My question is can I redirect www.domain.com/page1.php to www2.domain.com/page1.php and how do I do that?
    I'm very new at this so if anyone could help me I would really appreciate it. Thanks!
     
    clay15, Oct 13, 2005 IP
  2. Jim_Westergren

    Jim_Westergren Notable Member

    Messages:
    1,882
    Likes Received:
    247
    Best Answers:
    0
    Trophy Points:
    235
    #2
    Jim_Westergren, Oct 13, 2005 IP
    clay15 likes this.
  3. clay15

    clay15 Well-Known Member

    Messages:
    449
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    118
    #3
    clay15, Oct 13, 2005 IP
  4. Jim_Westergren

    Jim_Westergren Notable Member

    Messages:
    1,882
    Likes Received:
    247
    Best Answers:
    0
    Trophy Points:
    235
    #4
    Not so sure about that, but I am not so skilled at this.

    Try with my line and test.
     
    Jim_Westergren, Oct 13, 2005 IP
  5. johnt

    johnt Peon

    Messages:
    178
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If I'm reading you right, clay15, you want to redirect any page on 1 domain to the same page on another domain ?
    If that is what you're after, you can use
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.domain1\.com$
    RewriteRule ^(.*)$ http://www.domain2.com/$1 [R=301]
    Code (markup):
     
    johnt, Oct 13, 2005 IP
    clay15 likes this.
  6. clay15

    clay15 Well-Known Member

    Messages:
    449
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    118
    #6
    that seems to do what I was looking for, thanks guys!
     
    clay15, Oct 17, 2005 IP