homepage Welcome to WebmasterWorld Guest from 184.72.91.94
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library : Charter : Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
.htaccess syntax
oilman




msg:1520157
 7:51 pm on Nov 2, 2001 (gmt 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

 

Gorufu




msg:1520158
 11:13 pm on Nov 2, 2001 (gmt 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...]

oilman




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

Rock and Roll Gorufu. Thanks works like a charm.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved