Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The URL structure for Joomla 1.5 changed in version 2.5.

Before it was:

http://example.com/index.php?option=com_content&task=view&id=587&Itemid=73

Now it's:

http://example.com/index.php?option=com_content&view=article&id=587&Itemid=114

*Note the id and itemid numbers change based on page and while all pages have an id not all have the Itemid in the url.

While we updated all links in the database lots of people still have the old link structure so we want to edit the htaccess file so if someone enters the old structure it will forward to the right structure.

Simply put any URL entered at example.com with task=view in the url should be replaced with view=article.

Does anyone know a simply way to do this in htaccess?

share|improve this question
    
Does the example case you've given cover the structure of the request for all of the redirecting you're looking to do? –  Shane Madden Jun 13 '12 at 1:13
    
Actually just found the solution: codejoomla.com/joomla-user-guide/… unless someone knows a better way. –  heavymark Jun 13 '12 at 1:18
1  
That should do the trick! Post it as an answer when the system lets you and mark it as accepted, so the next person who runs into this will find it! –  Shane Madden Jun 13 '12 at 1:22
add comment

1 Answer

up vote 0 down vote accepted

The answer can be found here: http://www.codejoomla.com/joomla-user-guide/old-urls-dont-work-after-upgrading-10-to-17.html

update `jos_content` set `introtext` = replace(introtext,'task=view','view=article');

update `jos_content` set `introtext` = replace(introtext,'task=category','view=category');

update `jos_content` set `introtext` = replace(introtext,'task=blogcategory','view=category&layout=blog');

update `jos_content` set `introtext` = replace(introtext,'option=com_wrapper&Itemid=','option=com_wrapper&view=wrapper&Itemid=');
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.