mark_nsx Posted July 2, 2009 Share Posted July 2, 2009 Hi guys. I'm having problems with RewriteRule. Basically I have a sever with 1 static IP and several domains pointing to it (A records.). What I want to do is capture the domain name of those A records (i.e. www.sample.com) and rewrite it as subdomain of the main server (sample.maindomain.com) without altering the URL in the address bar. Here's what I got which isn't working: RewriteEngine On RewriteRule ^www.(.*).com$ http://$1.maindomain.com [L] Quote Link to comment https://forums.phpfreaks.com/topic/164477-rewriterule-question/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.