1

Is it possible to mask a url to a new domain in wordpress?
For example: URL : abc.com/test
I want the content of abc.com/test but the url to be changed to xyz.com.
I have tried adding .htaccess code but it did not work.

Beso
  • 1,176
  • 5
  • 12
  • 26
Test
  • 19
  • 1

1 Answers1

0

You can 301 redirect from abc.com/test to xyz.com but the wordpress deployment should be running on xyz.com

RewriteEngineOn
RewriteCond%{HTTP_HOST} ^abc.com/test RewriteRule ^(.*) http://newdomain.com/$1 [P] 

add this to the .htaccess file on abc.com/test path

Mustafa sabir
  • 4,130
  • 1
  • 19
  • 28