views:

9

answers:

1

I need to rewrite:

index.php?node=[something]

to

/node/[something]

(the "node" part will be static text and it's not important)

i've tried:

RewriteRule ^index\.php?node=(.*)$ /node/$1 [L,R=301] 

(again the rewritten "node" part will be static text and it's not important)

and a lot of other variations without success...

Thanks!

+1  A: 

You need to use a RewriteCond to examine the query as it’s not part of the URL path:

RewriteCond %{QUERY_STRING} ^(([^&]*&+)*)node=([^&]*)(&.*)?
RewriteRule ^index\.php$ /node/%3?%1%4 [L,R=301]
Gumbo