Welcome to WebmasterWorld Guest from 54.163.52.98

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess syntax

     

oilman

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

WebmasterWorld Senior Member 10+ Year Member



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

Gorufu

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

10+ Year Member



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

oilman

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

WebmasterWorld Senior Member 10+ Year Member



Rock and Roll Gorufu. Thanks works like a charm.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month