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.

Redirecting users from old site to new site

Discussion in 'Apache' started by domokun, Sep 5, 2005.

  1. #1
    Hi there,
    I have an old site (domainA.com) and I want all users visiting a specific folder on that site to be redirected to a folder on my new site (domainB.com)

    I want to use the htaccess file to make this happen. Can you tell me if the code below will work as intended:

    RewriteEngine on
    RewriteRule ^content/([^\.]+)\.html$ http://[B]www.domainB[/B]\.com/content/$1.html

    I.e.
    If a user tries to go to

    domainA.com/content/anything.html

    I want them to be redirected to

    domainB.com/content/anything.html

    Look okay?
     
    domokun, Sep 5, 2005 IP
  2. johnt

    johnt Peon

    Messages:
    178
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Looks fine
     
    johnt, Sep 5, 2005 IP