I know this questions have been asked a million times but it's hard to fit them in every specific case. so i will try to explain my scenario
Google indexed my old domain urls with something like
www.oldDomain.com/city/newyork
and i want to redirect to
www.newDomain.com/newParameter/newyork
NOTE : both domains point to the same host, same folder.
what's the best way to do it?
In your old host use this rule in site root .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^ http://www.newDomain.com/newParameter%{REQUEST_URI} [L,NE,R=302]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.