Welcome to WebmasterWorld Guest from 54.162.211.233

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess syntax

     
7:51 pm on Nov 2, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 10, 2000
posts:2151
votes: 0


I'm trying to set up a global 301 redirect for a site that has moved to a new domain and I'm having some trouble with syntax.

I'd like to any request for any page on the old domain to redirect to a "this site has moved" page. ie: anything at domainA.com and it's subdirectories will redirect to domainA.com/moved.htm

11:13 pm on Nov 2, 2001 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 16, 2000
posts:122
votes: 0


Hi Oilman,

RedirectMatch uses regular expressions

RedirectMatch regex Full-URL
produces a 302 error

RedirectMatch permanent regex Full-URL
produces a 301 error

RedirectMatch gone regex
produces a 410 error

The following line should work. It worked for me.

RedirectMatch permanent (.*) [domainA.com...]

11:17 pm on Nov 2, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 10, 2000
posts:2151
votes: 0


Rock and Roll Gorufu. Thanks works like a charm.