We help IT Professionals succeed at work.

Domain forwarding using

shahedny asked
Medium Priority
Last Modified: 2012-05-06
We are tring to forward an old domain using 301 redirect so google can forward all SEO traffic to new server. It works fine if If I type only old domain but I want to forward all old url to new domain root folder. Example: olddomain.com/sales/ should come to newdomain.com/index.php
RewriteEngine On
RewriteCond %{HTTP_HOST} olddomain.org$
RewriteRule ^(.*)$ http://www.newdomain.org/$1 [R=301,L] 
RedirectMatch permanent ^/$ http://olddomain.org/esales/index.php

Open in new window

Watch Question

Try using this?
Redirect 301 /oldpage.html http://www.newdomain.org/newpage.html


well there are hundreds so this is not possible thats why I want all users coming to old site comes to new site homepage

Why can't you use redirect 301 / http://www.newdomain.org in the htaccess?

Also some apache installations require the Options +FollowSymLinks option before all the redirect business for it to work.
we couldn't find solution from these answers

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.