1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Instant $10 by Paypal - URL Re-writing/301 Redirect Error Help Needed

Discussion in 'BlackHat Lounge' started by beazt, Jul 16, 2011.

  1. beazt

    beazt Power Member

    Joined:
    Oct 29, 2009
    Messages:
    765
    Likes Received:
    1,245
    Occupation:
    IM
    Location:
    BHW
    Home Page:
    Need a little help with URL redirection. Instant $10 by paypal to the first person who solves this for me

    A page of my website goes like this:
    Code:
    www.domain.keyword2-keyword1.html
    Now, I want to rewrite it as follows:
    Code:
    www.domain.keyword1-keyword2.html
    I did this by adding this code to my .htaccess file:

    Code:
    RewriteRule (.*)keyword1-keyword2.html  keyword2-keyword1.html  
    At this stage, the page loads both by entering the old as well as the new URL
    Now the old URL had about 100+ backlinks and PR of 1 which I didn?t want to lose. So I used a simple 301 redirect to transfer the old URL?s PR and link juice to the new URL as follows:

    Code:
    Redirect 301 /old.html http://www.domain.com/new.html
    At this stage the trouble begins.

    When I enter the new URL, the page loads just fine. However, when I enter the old URL into the browser, it just redirects to the home page.

    Also, in place of manually entering the old URL, if I navigate to the page by clicking on the link on the website, the page loads but the URL is shown as follows:
    Code:
    http://www.domain.com/keyword1-keyword2.html[B]?URL=keyword2-keyword1[/B]
    
    Obviously there is something wrong with it. So my question this - how do you first re-write a URL and then 301 redirect the old URL to the new one? Or is it the wrong way of doing this?
     
  2. beazt

    beazt Power Member

    Joined:
    Oct 29, 2009
    Messages:
    765
    Likes Received:
    1,245
    Occupation:
    IM
    Location:
    BHW
    Home Page:
    Anyone?
     
  3. aparungao

    aparungao Junior Member

    Joined:
    Apr 2, 2011
    Messages:
    100
    Likes Received:
    7
    Hey I might help you with your problem, but I can't post my solution here as it's detected as URLs. Please give me your email. Thank you.
     
  4. beazt

    beazt Power Member

    Joined:
    Oct 29, 2009
    Messages:
    765
    Likes Received:
    1,245
    Occupation:
    IM
    Location:
    BHW
    Home Page:
    PM sent
     
  5. chouchouboys

    chouchouboys Junior Member

    Joined:
    Jan 3, 2009
    Messages:
    120
    Likes Received:
    51
    Occupation:
    translator
    Location:
    country of 1million&half marthyrs
    wish you will solve your prb asap :)