0

I have a Wordpress website having a domain for example: example.com and there're a few pages like example.com/shop , example.com/products/sample-product which I want to be viewed via myshopexampledotcom , myshopexampledotcom/products/sample-product respectively. I know writing a simple 301 redirect will do the job but I don't want to create a new Wordpress site for myshopexampledotcom instead I would like to simply map specific pages from example.com to myshopexampledotcom. Is it possible via writing something inside a VirtualHost?

Faizan Ali
  • 101
  • 3

1 Answers1

0

Correct me if i misunderstood the question but ProxyPass will do the thing. If you want to map example.com/shop to myshopexample.com you need to add below line in your example.com virtualhost configuration.

ProxyPass /shop http://myshopexample.com/
ProxyPassReverse /shop http://myshopexample.com/

For this you need to enable mod_proxy module in your apache configuration. Read more for reverse proxy guide. https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html