Domain Name Redirection with Path?

91 Views Asked by At

I need your Help please! I have a domain name that redirected to an other:

www.xxx.com ===> redirected to ===> www.yyy.com

If i write www.xxx.com/photo.html, i want to be redirected to www.yyy.com/photo.html.

It's possibl ?

2

There are 2 best solutions below

0
On

If you want all pages of one domain to be redirected to other domain, following .htaccess code will redirects everything after the domain name on the url to the exact same copy on the new domain url:

RewriteEngine on 
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
0
On

Referring to previous answer to help illuminate the options. Please feel free to ask any additional questions after reading that.