How to Redirect 1.0 URL's to Joomla 1.5

You may have noticed that Joomlashack is now running on Joomla 1.5. We did a stealth migration yesterday.

We had one problem we needed to address, and it took a while to figure out, so we thought we would share the solution for others.

Our old site used Joomla 1.0, as I have mentioned before, we wanted to make sure we did a 301 redirect of the Joomla URL's so Google would quickly pick up the new ones and pass the pagerank to the new pages. The problem however was that our 1.0 site used the raw URL:

We rapidly discovered that mod-write unfortunately will basically ignore all the php parameters here. You can't get rewrite to pay any attention to them.

After some research and lots of trial and error we found that we could make a redirect like this:

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?option=com_content&task=view&id=37(.*)\ HTTP/
RewriteRule ^index\.php$ [R=301,L]

Its ugly, but it works!

We also found that the redirects need to be placed in the htaccess file before the main Joomla code (exploits and core sef).

Now we just have to figure out another Pagerank dilution problem.

  • has a page rank of 6
  • has a page rank of 9

We'll need to redirect just the index.php without breaking the rest of the core SEF function in Joomla.