w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
htaccess redirection to subdomain retaining domain URL?

Something like this should work:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.x.com$ [NC]
RewriteRule ^ http://y.x.com%{REQUEST_URI} [P,L]

so if they go to http://www.x.com/post/1225 they will see the content located at http://y.x.com/post/1225

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.