URL rewriting in Lotus Domino (change old domain name for the new domain name)

Hello,

We are currently using the same domain for all our applications (domain1.com for example).

However, this domain is no longer relevant. We purchased another domain (domain2.com for example) and we want to this one instead for all our applications.

I want all request using domain1.com to be redirected to domain2.com… Sounds easy?

I took at look at the URL Redirection and URL Substitution of Lotus Domino. After many tests, I was never able to make this work. I finally found this:

"the patterns you specify for a rule’s Incoming URL pattern field should never include a host name "

  • Since I can’t include a host name, URL Redierction/Substitution are no use for me.

I looked around this forum and found nothing of interest regarding my issue.

I can’t believe this can’t be done.

Is there a way to redirect an incoming domain name to another one?

Thanks!

Subject: URL rewriting in Lotus Domino (change old domain name for the new domain name)

I’m not an expert on that (as usually), but I think that this should really be handled by a DNS redirect.

Subject: RE: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Maybe I don’t get it, but I don’t know how DNS could help me on this one.

I’m not changing any IP addresses… just the domain name used.

I want users who type “domain1.com” in their browser be redirected to “domain2.com” (and see the change in the browser address bar)

Thanks!

Subject: RE: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Well, what does DNS do? It matches domain names to IP addresses. Sounds like the natural plae to me. There are also alias records and that’s what I think might be used.

You could still create web site documents for domain1 and domain2 and configure domain1’s home url to display a redirection page only (using meta tags and/or JavaScript and providing a “manual” link, in case a user has disabled both. But that’s not too elegant.

In any case, what you really want is probably the server returning HTTP Status code 301 (moved permanently) and unfortunately Domino cannot do that before V8.

Subject: RE: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Like you said, DNS matches domain names to IP addresses… it doesn’t make redirection to another domain name.

For example, if I create an alias from www.domain1.com to www.domain2.com, that only means that the IP address of www.domain2.com will be used for www.domain1.com also. The user will still use and see www.domain1.com in its browser.

As for your other suggestion, that’s what I was afraid of. I also thought about that and tried to avoid it, cause as you said, it’s not too elegant. Unfortunately, if nobody proves me wrong, I think that’s my only workaround.

Thanks for you help!

Subject: RE: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Right, a DNS alias would not keep users (or search engines for that matter) from using the old domain forever (or until it’s shut down …).

Still, there is no way to simply configure a 301 redirect in Domino releases prior to 8, unless you are using Apache as the http stack in front of Domino.

Subject: RE: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Thanks for your help.I think I’ll have no choice but to implement your suggestion:

“You could still create web site documents for domain1 and domain2 and configure domain1’s home url to display a redirection page only (using meta tags and/or JavaScript and providing a “manual” link”

Subject: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Hello Pascal,i solved the same problem by creating a Virtual Host Document

Hostname: www.olddomain.com Mapping: www.newdomain.com

and it works fine.

HtH

Heinz

Subject: RE: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Hello Heinz,

By “Virtual Host Documents”, are you referring to “Internet Web Sites”. If I’m not mistaken, Virtual Host were used in R5… in the Web Configurations view. In R6-R7, the Internet Sites view is now used.

The problem is that I don’t want to redirect anything from my old domain to a new static address.

I want to do something like this:

#1

Incoming URL : http://domain1.com/dir/db.nsf

Redirected URL : http://domain2.com/dir/db.nsf

#2

Incoming URL : https://host1.domain1.com/dir/db2.nsf

Redirected URL : https://host1.domain2.com/dir/db2.nsf

Unless I don’t understand your suggestion, I don’t think Virtual Host would solve this problem.

Thanks for your help!

Subject: RE: URL rewriting in Lotus Domino (change old domain name for the new domain name)

Just doing a little testing (instead of just talking from (what I believed to be fresh) memory).

Stay tuned, it might just work out …

Subject: URL rewriting in Lotus Domino - 301 redirect works!

Holy shi … mmer! It works! Do update to 7.0.3 now!

In DNS, create two A records pointing to your IP address, one for domain1.com and one for domain2.com. Don’t make any of them an alias (CNAME).

Next, configure two website documents. One for the new domain2.com, as you would normally do. In fact, you will already have this one for domain1.com, just rename it to domain2.com.

Then, create a new website document for the old domain1.com. Actual configuration and Domino Web Engine settings don’t matter.

Finally, for this website document for domain1.com, create a redirection rule.

Incoming URL pattern: “/*”

Redirect to this URL: “http://domain2.com/*”

And tick the box “Send 301 Redirect”!!!

If your server is handling https connections as well, some more fiddeling might be required.

I am 100% sure, that I read on some “official” IBM blog, that the tick box was there for compatibility in mixed environments between 7 and 8 only, and did not have any effect for Domino 7 servers. Obviously, this is NOT true! The server really generates a nice and clean and smooth 301 redirect to the new domain.

I’ve been testing Domino 7.0.3 on Windows XP Pro and used a HOSTS entry for mapping both domains to the same IP address.

Subject: RE: URL rewriting in Lotus Domino - 301 redirect works!

It not only “works”, it’s actually official:

http://www-1.ibm.com/support/docview.wss?uid=sim418e1c9bfb19fb5498525731a00420ba7

Subject: RE: URL rewriting in Lotus Domino - 301 redirect works!

It’s really nice that we can now use 301 redirections in 7.03.The latest version we had was 7.02FP2… so that explains why I never saw that option.

However, Substitution rules cannot work on the domain name (only after the first “/”) and redirection rules are not really helpful to me… cause I’m using lots of different combinations of hosts:

http://domain1.com

https://domain1.com

http://www.domain1.com

http://host1.domain1.com

https://host2.domain1.com

http://host1.subhost1.domain1.com

And to have the domain name changed in a redirection rule, I have to hardcode the protocol and the host+domain name. I want a “find and replace” from the old domain name to the new domain name.

We’re getting closer… but I don’t think what I want can be done in Lotus Domino (at least in R7).

I do really appreciate your help on this though.

I will need to use 301 redirections in Domino for other projects… so now I know that can be done in 7.03.

Thanks again!