How to redirect dynamic url to dynamic pages?

Discussion in 'Apache' started by nicholas08, Dec 11, 2009.

  1. #1
    Hi,

    I want to redirect dynamic incoming url to dynamic outgoing url. Here is my example.

    Url enter: http://www.domain.com/go.php?id=[COLOR="Red"]xxxxx[/COLOR]
    
    Redirect to: http://www.newdomain.com/link/[COLOR="Red"]xxxxx[/COLOR]/
    Code (markup):
    What code do I have to put in my .htaccess?

    Is is possible to do this? Or, Is there alternative way to do this?

    Thank you.
     
    Last edited: Dec 11, 2009
    nicholas08, Dec 11, 2009 IP
  2. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteCond %{QUERY_STRING} ^id=([A-z0-9]+)$
    RewriteRule ^go\.php$ http://www.newdomain.com/link/%1/? [R=301,L]
    Code (markup):
     
    chadsmith, Dec 12, 2009 IP