This has been bugging me for hours...
RewriteCond %{QUERY_STRING} news_item_id=([0-9]+)
RewriteRule .* /node/%1 [R=301,L]
Basically, I want to convert an incomming URL like this:
Quote: "/news/index?region=global&news_item_id=148555"
to this:
Quote: "/node/148555"
According to my brain (which clearly is wrong) the above rule/condition says:
Quote: "Look at the Query String and match "news_item_id='a number'" and rewrite the entire URL with "/node/'a number'" and make that a 301 redirect and the last rule."
The resulting URL, in fact, comes out as:
Quote: "/node/148555?region=global&news_item_id=148555"
Does anyone have any idea's how to stop it tagging the query onto the end of the
Substitution URL? Is it something to do with only making the condition the query?!
Cheers guys, I know at least one of you will know what I'm doing wrong!!
[center]