Need help with a Rewrite rule
I need to change urls like this :
domain.com/beijing/index.php/component/messaging/message/components/com_kunena/template/default/images/index.php?option=com_content&view=article&id=603:luge-slide-at-mutianyu-great-wall-video&catid=45:outings&Itemid=66
So that the bold part is omitted.
In other words, find index.php? and add from there to domain/beijing
RewriteRule ^index.php?([^/]+) domain.com/beijing/index.php?$1
This doesn't work, as I think the ? is taken as a special character. But I need it because i dont want the url from the first /index.php/ only from index.php?...
I thought about something like this
RewriteRule %{QUERY_STRING} /beijing/index.php?%{QUERY_STRING}
but seems this is not correct way to write the rule.
Any help will be much appreciated.