Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
,htaccess setup curly_clare
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.
If it is every file maybe try.. RedirectMatch permanent ^(.*)\.htm $1.html
Each .htaccess file acts on that directory and its subdirectories.. I would expect you need only one htaccess file.
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].