301 Permanent redirect does not strip parameters...

Discussion in 'Apache' started by fatabbot, Jul 12, 2009.

  1. #1
    i'm doing a permanent 301 redirect from one url to another (all pages of one url redirect to the index page of the other url) - however, when a certain page on the old url has parameters, it redirects to http://www.domain.com/?id=20 - while it should strip of that parameter and redirect to http://www.domain.com

    Does anyone know how you can redirect ALL pages from the old domain, to the index page of the new domain, without having any parameters leftover in the url?
     
    fatabbot, Jul 12, 2009 IP
  2. vasyl

    vasyl Peon

    Messages:
    138
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Place following to .htaccess in the root of the old domain :

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.yournewdomain.com [R=301,L]:
     
    vasyl, Jul 12, 2009 IP