I would love to hear about it if anyone can anyone think of a way to achieve the following:
I have a customer who is interested in doing cool stuff with targeted advertising. He wants me to take a new domain he's acquired, e.g. specific-term.com and point it to a page on a drupal site (with clean URLs on and path aliases/redirects on), e.g. general-site.com/specific_term - that's not too hard, but here's the twist: do it without a redirect.
I've been able to set up an apache2 rule like this (in my apache virtual hosts file):
ServerAdmin webmaster@general-site.com
ServerName specific-term.com
RewriteEngine on
RewriteRule ^/(.*) http://general-site.com/specific_term [L,P]
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
The above alias works, in that if someone enters the URL http://specific-term.com they get the content on the page http://general-site.com/specific_term ... Problem is, as the page loads, the URL changes (the browser gets a 301 redirect) thanks to Drupal's devilishly clever built in clean URL and URL aliasing functionality. So what I want to do is figure out a way to leave the target page, http://general-site.com/specific_term, working as per normal if the user gets to it via that URL while at the same time
- allow the user to reach the same content without a redirect (301) on http://specific-term.com
- have internal links on the page ideally continue to use the http://general-site.com domain
I think this will be pretty tricky, if doable at all... I've thought about using a static page copy of the content at http://general-site.com/specific_term and making it the DocumentRoot for specific-term.com but that becomes hard to maintain, and I've had problems in testing it with the dynamically included CSS provided by modules - they error with the wrong mimetype according to firebug...
Any thoughts would be most appreciated!
Dave
Comments
You're going to need to use
You're going to need to use redirects, so doing this without them isn't possible. Try creating 307 (temporary redirect) and 303 (see other) redirects instead of 301 (moved permanently) redirects. The Path Redirect module can do this for you.
You could solve this by
You could solve this by adding a URL record in the DNS.
-----------------------------------------
CompuBase, websites and webdesign