[thelist] redirect .htm

Bob Meetin bobm at dottedi.biz
Sat Jan 7 13:31:51 CST 2012


The old site has a batch of .htm files.  They all need to be redirected to various custom pages as they won't exist on the new site.  Client gave me the list. The new site is done in joomla, so the new pages look something like: index.php?option=com_content&view=article&id=120&Itemid=125

Redirecting any .htm old file fails with a 500 error message. abc.htm, whatever.htm, etc all fail. This fails:

   RewriteRule whatever.htm index.php?option=com_content&view=article&id=120&Itemid=125

However if I redirect a .html file it works fine and redirects to the new url. This works:

   RewriteRule whatever.html index.php?option=com_content&view=article&id=120&Itemid=125

Within joomla you can turn on people friendly URLs.  The people friendly version of the above url would look something
like whatever.html. i.e. index.php?option=com_content&view=article&id=120&Itemid=125 == whatever.html

I just figured out that redirecting a .htm to a people-friendly url does work. The following passes:

   Redirect whatever.htm whatever.html

I guess working with what works I just need to go through the file list, and set up the redirects according to the people friendly url. Seems silly but if it works...

Thx, Bob


More information about the thelist mailing list