Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

,htaccess setup



3:26 pm on Feb 5, 2004 (gmt 0)

10+ Year Member


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.


3:46 pm on Feb 5, 2004 (gmt 0)

10+ Year Member

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.


4:36 am on Feb 6, 2004 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member


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].



Featured Threads

Hot Threads This Week

Hot Threads This Month