Zen Cart Logo
Forums / General Questions / .htaccess redirect to new domain

.htaccess redirect to new domain

Locked

Views: 1,300

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
1 Aug 2010, 3:17 PM
#1
convergence avatar

convergence

New Zenner

Join Date:
Nov 2006
Location:
Brighton, CO
Posts:
90
Plugin Contributions:
0

.htaccess redirect to new domain

Greetings,

Have a client who is rebranding and changing their domain name for their store.

Can change their store domain name on the server as well as the config files.

Need help with creating a redirect in .htaccess for links already indexed.

Old store is NOT directing to www - new store will be.

OLD store:

http://subdomain.olddomain.ext

NEW store:

http://www.newdomain.ext

Any help is greatly appreciated.

Thanks!

3 Aug 2010, 3:28 PM
#2
convergence avatar

convergence

New Zenner

Join Date:
Nov 2006
Location:
Brighton, CO
Posts:
90
Plugin Contributions:
0

Re: .htaccess redirect to new domain

itty bitty 'bump' :)

3 Aug 2010, 3:46 PM
#3
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: .htaccess redirect to new domain

RedirectMatch .* http://www.newdomain.ext/
Options -Includes -Indexes -ExecCGI

The above would go within the .htaccess file located in the sub-dir.

public_html/sub-dir/.htaccess

3 Aug 2010, 3:51 PM
#4
convergence avatar

convergence

New Zenner

Join Date:
Nov 2006
Location:
Brighton, CO
Posts:
90
Plugin Contributions:
0

Re: .htaccess redirect to new domain

Website Rob:

RedirectMatch .* http://www.newdomain.ext/
Options -Includes -Indexes -ExecCGI

The above would go within the .htaccess file located in the sub-dir.

public_html/sub-dir/.htaccess

Thanks Website Rob.

Will give it a go.

4 Aug 2010, 5:47 AM
#6
convergence avatar

convergence

New Zenner

Join Date:
Nov 2006
Location:
Brighton, CO
Posts:
90
Plugin Contributions:
0

Re: .htaccess redirect to new domain

Just came up with this - Don't know if it's correct for Zen or not - but it appears to work :)

RedirectMatch permanent ^/(.*)$ http://www.newdomain.ext/$1