Forum Moderators: phranque

Message Too Old, No Replies

Redirect of domain/index.htm to domain/

Using Apache 301 Redirect to have canonical home page without infinite loop

         

nowpc

11:56 am on Apr 9, 2009 (gmt 0)

10+ Year Member



Hi all. I'm looking to achieve a canonical home page address on a site, but I can't figure out how to do it! I guess this gets asked all the time, but here goes:

Using Apache on a virtual server, I want to 301 Redirect -

- www.domain.com/index.htm

to

- www.domain.com/

When I've tried (a number of variations on) this I've had nothing but 500 server or infinite redirect errors. I guess the solution is actually pretty simple (!) but I'm darned if I can find it... :)

Any help would be greatly appreciated, thanks!

jdMorgan

12:32 pm on Apr 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi nowpc, and welcome to WebmasterWorld!

This thread [webmasterworld.com] in our Apache forum should help you get started.

Change "php" to "htm" in both lines to suit your requirements.

Jim

[edited by: jdMorgan at 12:32 pm (utc) on April 9, 2009]

nowpc

1:59 pm on Apr 9, 2009 (gmt 0)

10+ Year Member



Fantastic jdMorgan, that's the very thing! :)

Cheers,
Neil.