Hey Team,
Really out of my league on this as I have been reading online but not getting the finer points of everyone's explanations so thought i would post my challenge here and see if anyone can help me....
1. I had a Joomla site up for over three years. I moved away from Joomla to a Word Press site about two months ago.
2. My old joomla site had dirty URLs... like this http://www.site.com/index.php?option...=06&Itemid=116.
3. Now that I have migrated to WP I have clean URLs...
Having said all of that, I have a ton of 404 errors on the site after the migration that I need to clean up..... The majority are old query string URLs from the old Joomla site. I want to redirect people to the home page of the site if they try to go to any of the old query string URLs.
First Challenge: The query string URLs I want to redirect were dynamically generated by some of the old Joomla Modules so I need to do a wildcard on the first part of the query string so that anything after the wildcard is also caught with the redirection rule.
So... here is what I am trying to do:
Example URL that is getting 404 error: http://www.site.com/index.php?option...=06&Itemid=116
What I want to catch: http://www.site.com/index.php?option=com_jevents**wild card here ** <-- basically any query string that starts with "?option=com_jevent"
Where I want to redirect to: http://www.site.com/
I came up with the following but know it isn't correct as I am getting 500 - Internal Server Error with this one:
Anyone know what I did wrong or what would be correct?Code:# redirect old JEvents Query String URLS to home page RewriteCond %{QUERY_STRING} ^?option=com_jevents(.*)$ [NC] RewriteRule jevents http://www.www.site.com/ [R=301]
Thanks,
Rick