Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe to WebmasterWorld
,htaccess setup curly_clare msg:1513583 3:26 pm on Feb 5, 2004 (gmt 0) Hi,
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.
davidpbrown msg:1513584 3:46 pm on Feb 5, 2004 (gmt 0)
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.
jdMorgan msg:1513585 4:36 am on Feb 6, 2004 (gmt 0)
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].