0

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 htaccess:

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

thank you!!

skaffman
  • 398,947
  • 96
  • 818
  • 769
elmaso
  • 193
  • 1
  • 2
  • 14

1 Answers1

0

Ok, retry :)

RewriteCond %{QUERY_STRING} ^index=([a-zA-Z0-9]+)$
RewriteRule ^/ /%1? [R=302,L]
Wolph
  • 78,177
  • 11
  • 137
  • 148