htaccess: Redirect a Dynamic URL - Show only Static URL - Double Content

Posted by elmaso on Stack Overflow See other posts from Stack Overflow or by elmaso
Published on 2010-04-09T23:00:47Z Indexed on 2010/04/09 23:03 UTC
Read the original article Hit count: 227

Filed under:
|

Hi, I have a rewrite rule to get clean urls.. the only problem is, google shows some dynamic url and i dont want to serve dynamic urls.

What I want: if a user types in the dynamic url, he gets redirected to the clean url.. example:

    http://www.example.com/?index=bananas 
    (if someone types that in, he gets redirect to the url above)
    http://www.examplcom/bananas/

this is my htacces:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond $1 !apple\+banana
RewriteRule ^(.*)\+apple\+banana/$ ?q=$1 [L]

thank you!!

© Stack Overflow or respective owner

Related posts about rewrite

Related posts about redirect