Legacy links rewrite
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 tr开发者_运维问答ied:
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!
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]
精彩评论