Domain forwarding using

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

shahednyAsked:
Who is Participating?
 
shahednyAuthor Commented:
we couldn't find solution from these answers
0
 
namolCommented:
Try using this?
Redirect 301 /oldpage.html http://www.newdomain.org/newpage.html
0
 
shahednyAuthor Commented:
well there are hundreds so this is not possible thats why I want all users coming to old site comes to new site homepage
0
 
namolCommented:
Why can't you use redirect 301 / http://www.newdomain.org in the htaccess?
0
 
namolCommented:
Also some apache installations require the Options +FollowSymLinks option before all the redirect business for it to work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.