Forum Moderators: phranque
I'm having a nightmare here! I've created a .htaccess file as below due to the fact that all the file names on our site changed from .htm to .html:
---------------------
redirect 301 /filename.htm [mydomain.co.uk...]
----------------------
When I upload this file it works fine, no problem!
I need to do this for every page so I assumed that i could write a line of code for every page in a single .htacccess file. However when i uploaded this file the site was returning a 500 Internal error code.
Is it necessary to upload a seperate .htaccess file
for each redirect? If so, do you call them all .htaccess or use unique filenames?
Any help and advice would be greatly appreciated.
Many thanks.
It will only necessary to have one line of code in one .htaccess file to redirect all of your pages.
You need only add "http://www.example.com" to the new URL in the above code, as shown in the example given in the RedirectMatch documentation [httpd.apache.org].
Jim