Solved Rewrite rule - 301 redirect - main URL, not rest of site

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

GoodCode

Thread Starter
Joined
Feb 23, 2017
Messages
2
I want to redirect all pages on a site to a new domain with the same page URL structure. I'm using GoDaddy shared server. I added the code below to the .htaccess file and the code does redirect visits from the home page of the old site to the home page of the new site. However, no other pages are redirected. Do you know a solution?

Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^olddomain.com [nc]
rewriterule ^(.*)$ http://www.newdomain.org/$1 [r=301,nc]
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top