homepage Welcome to WebmasterWorld Guest from 54.205.254.108
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved