Forum Moderators: phranque

Message Too Old, No Replies

RedirectMatch suddenly starts error 500s

used to work fine

         

Dhigger

9:38 pm on Sep 29, 2009 (gmt 0)

10+ Year Member



My site went down today (500 internal server error) and I traced the problem to a line in my .htaccess file. Thing is, I haven't changed anything in .htaccess for years.

It is

RedirectMatch ^/siteindex(.*) http://www.example.com/topicindex$1 [L,R=301]

Any idea why it might produce error 500s all of a sudden?

Caterham

10:55 pm on Sep 29, 2009 (gmt 0)

10+ Year Member



[L,R=301] is invalid here.

The syntax would be

RedirectMatch 301 ^/siteindex(.*) http://www.example.com/topicindex$1

or better

Redirect 301 /siteindex http://www.example.com/topicindex

which is the same if siteindex would be followed by a slash (redirects /siteindex/foo to /topicindex/foo but not /siteindexes to /topicindexes as your RedirectMatch would do.

Dhigger

9:17 am on Sep 30, 2009 (gmt 0)

10+ Year Member



Thanks