The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permanent Redirects to PHP Pages Not Working

Discussion in 'General Discussion' started by Beachdog, Apr 3, 2007.

  1. Beachdog

    Beachdog Registered

    Joined:
    Apr 3, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    We just did a conversion of a site to osCommerce, and we want to do redirects within cPanel to try and maintain SEO. When I try and do a redirect from http://www.domainname.com/oldpage.html to
    Code:
    http://www.domainname.com/product_info.php?products_id=220
    cPanel tries to send me to
    Code:
    http://www.domainname/product_info.php%3fproducts_id=220
    .

    Why is the question mark being replaced with the %3f (I'm sure that it's the code for question mark, but still) and how do I make it NOT do that?

    Thanks for the help, and sorry if this fix is published elsewhere. I did a search for redirect AND php and didn't see it.
     
  2. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    16
    Add the following rule inside the .htaccess file under the public_html folder.

    Code:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{QUERY_STRING} ^$ 
    RewriteRule ^(oldpage\.html) /product_info.php?products_id=220 [R=301,L]
    
     
  3. Beachdog

    Beachdog Registered

    Joined:
    Apr 3, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply. After doing additional research I discovered that this was likely the direction that I'd have to go with it, instead of the cPanel route.
     
Loading...

Share This Page