I was initially thinking to use mod_rewrite or mod_alias to do it, but they only seem to be able to affect the internal file addresses, rather than being able to modify the entire url.
Did you try a simple redirect? Or are your domains not at the same host? I just tested this:
In domain.nl which is pointing to domain.com I've put a .htaccess with this redirect in it:
Originally posted by MCookie Did you try a simple redirect? Or are your domains not at the same host? I just tested this:
In domain.nl which is pointing to domain.com I've put a .htaccess with this redirect in it:
So when I asked for domain.nl/folder/ I was seamless redirected to domain.com/folder/otherfolder/
But that wouldn't be able to discriminate - so requests for domain.com/folder would also be redirected to domain.com/folder/otherfolder - that was the issue, that those techniques can't query the whole URL, only the bit after the root.
Spookster - the host doesn't give us much; when I asked my tech support contact how this could be done, he didn't know and pointed me to the apache documentation for Redirect commands. Not ideal really ... I don't usually expect a webhost to say "work it out yourself" ... makes me wonder why we're using them at all ...
Anyway . in the meantime - what are "domain pointers" - is it someting I can set up myself?
But how is that acheived unless your two domain names are initially pointing at two different IP addresses?
Those domain names are pointing to the same IP. But that doesn't matter. It only means that requests for domain.nl/ are redirected to domain.com/. Root level.
As long as you can use a .htaccess at the first domain, you can redirect every possible url request to any other folder or file at any other domain on the net.
But that wouldn't be able to discriminate - so requests for domain.com/folder would also be redirected to domain.com/folder/otherfolder - that was the issue, that those techniques can't query the whole URL, only the bit after the root.
If you would use this at ireland.ie:
Redirect /information/ http://www.britain.com/international/ you would redirect every request for any file in www.ireland.ie/information/ to www.britain.com/international/. You can't discriminate, but on a file level every redirect is possible. The only condition is the possibility to use a .htaccess at the domain wherefrom you want to redirect.
I'm probably being really stupid here ... but i still don't grock this.
Both domains point to the same IP address - domain.com and domain.ie are the same root folder on the same server. How does the .htaccess know which domain name you asked for?
Domain.com and domain.ie are the same root folder? Never thought of that. But that's where your redirecting ends, I think.
In my case, the .nl domain is a second folder at the root of .com. I don't know why they they did that. We only wanted to redirect users typing in domain.nl by mistake to redirect to domain.com/. So domain.nl/ points to domain.com/ but I can put .htaccesses in both.
If you can't do that I don't know how to redirect or rewrite. As you said in your first post redirecting or rewriting absolute URLs is not possible.
But then (now it's me being stupid), since you can't use the domain.ie/ for anything else but redirecting to domain.com/, why would users request a page domain.ie/information.html if such page never existed or even could exist in the first place?
Ah well .. that's kind of the whole problem. It never used to be like this - it used to be that those pages were on a completely different server, run by different people for a different company.
But my company is a bit like the Borg (except without the Evil) - it buys out smaller companies in order to extend the range of international services we can offer, and we're in the process of assimilating their websites into our own.
So the deeplinks are out there already, and I don't want them to break.
Ah well; i'm looking into the DocumentRoot directive now, to see if that can help (if I can persuade our host to turn it on ...)
Looks really complicated. I was wondering if the request for domain.ie/information.html actually ever reaches your .com server? Somewhere in between there's the DNS record for domain.ie and that is pointing the request for .ie to domain.com. So maybe your server never even sees the .ie extension, in which case there's just nothing you can do. You'd need Borg technology...
Maybe moving to another host is best then. One that puts a folder in your root for every domain that points to your .com. I thought that's sort of common thing to do.