Page is a not externally linkable
- Search Engines
-- Sitemaps, Meta Data, and robots.txt
---- Help: htaccess rewrite rule


bramley - 6:10 pm on Apr 2, 2011 (gmt 0)


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.


Thread source:: http://www.webmasterworld.com/robots_txt/4291254.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com