angelcool Posted August 16, 2012 Share Posted August 16, 2012 Hello, I need to to replace the domain name and part of the URL to another domain name. So, http://www.samplesite1.com/subsite/ gets changed for http://www.samplesite2.com That way users going to samplesite2 will see the content of the subsite with samplesite2 domain in browser. any help is apreciated. Thanks Link to comment https://forums.phpfreaks.com/topic/267157-change-domain-and-part-of-url-with-mod_rewrite-help/ Share on other sites More sharing options...
jonsjava Posted October 28, 2012 Share Posted October 28, 2012 I won't go into much explination, but this is basically what you would want to do. RewriteRule ^subsite/(.*?)$ http://www.sampiesite2.com/$2 Link to comment https://forums.phpfreaks.com/topic/267157-change-domain-and-part-of-url-with-mod_rewrite-help/#findComment-1388222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.