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.

Website redirect adds query string

Discussion in 'Apache' started by TurkeyEater, Sep 30, 2012.

  1. #1
    Im trying to redirect an entire site using .htaccess. My code is

    redirect 301 / http://newsite.com/

    However, when i click on link from google that was oldsite.com/pictures.php, it sends me to newsite.com/pictures.php. I only want it to go to newsite.com.

    The redirect is the only thing in my .htaccess. Please help. I have spent all day on this.

    Thanks.
     
    Solved! View solution.
    TurkeyEater, Sep 30, 2012 IP
  2. #2
    Try with the following code:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newsite.com [R=301,L]
    Code (markup):

     
    RoseHosting, Oct 1, 2012 IP
    TurkeyEater likes this.
  3. TurkeyEater

    TurkeyEater Active Member

    Messages:
    264
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Works perfectly. Thanks so much.
     
    TurkeyEater, Oct 1, 2012 IP