.htaccess issues

Right, I have been trying to update a website from a mix of static html and shtml pages to the wonders of “ultra modern” php.

The new pages are working fine and everything seemed to be going well until I decided it was time to accomodate all the people who had links to the old pages. (Not to mention try to retain the very high page rank the site had on google… 😉 )

Now, as the site was hosted on Apache / Unix, common sense says .htaccess is the way to go. I edited the file as follows:

There was an already existing line:

Redirect 301 index.html http://www.example.com/index.php

Which was handy. This works. Every day. So all I did was add a load of extre redirects along the following lines:
Redirect 301 old_name.shtml http://www.example.com/new_name.php

(note that it is all one line)

Now logic would say this should work fine. Except it doesnt. Nothing I do makes it work. I have tried adding full and partial URIs to both sides. I have tried swapping the sequence. Nothing.

In the end I gave up and used mod_rewrite to solve the problem which works, but is no where near as elegant.

Any ideas what I did wrong?

This entry was posted in Uncategorized by Site Admin. Bookmark the permalink.

About Site Admin

Website administrator for the WhyDontYou domain. Have maintained and developled a variety of sites, ranging from simple, plain HTML sites to full blown e-commerce applications. Interested in philosophy, politics and science.