Mobile app version of vmapp.org
Login or Join
Smith883

: How to redirect pages to newdomain pages? hi guys I have a domain named old.com and it has some pages , how can I redirect all those pages to their new address using htaccess? currently only

@Smith883

Posted in: #Htaccess #Redirects #Seo

hi guys I have a domain named old.com and it has some pages , how can I redirect all those pages to their new address using htaccess? currently only old.com redirects to new.com but old.com/posts/ won't redirect to new.com/posts/ . Can anybody give me a htaccess code that passes the pagerank to new.com and redirects all pages to their new address ?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Smith883

1 Comments

Sorted by latest first Latest Oldest Best

 

@XinRu657

Below code will redirect all pages from old domain to new domain :

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^OLDDOMAIN.com$ [NC]
RewriteRule ^(.*)$ NEWDOMAIN.com [R=301,L]


Please specify actual domain name in above code.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme