Forum Moderators: phranque
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php\?(/[^\ ]*)?\ HTTP/
RewriteRule ^index\.php\?(/(.*))?$ http://termeszetbolond.hu/$2 [R=301,L]
RewriteRule can see only the path part of the HTTP request, not the query string. \?(/(.*))?$ from the RewriteRule because it will NEVER match. RewriteCond the \?(/[^\ ]*)?\ part matches the literal question mark and appended query string data. %1. That's %1 not $2. \?/([^\ ]*)?\ or similar, in place of the existing \?(/[^\ ]*)?\ code.
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php\?/([^\ ]*)?\ HTTP/
RewriteRule ^index\.php http://termeszetbolond.hu/%1 [R=301,L]