Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 448
  • Last Modified:

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

0
shahedny
Asked:
shahedny
  • 3
  • 2
1 Solution
 
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
 
shahednyAuthor Commented:
we couldn't find solution from these answers
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now