Hiding / Masking Database / File Names in URLs

Greetings,

We’re wondering here how it is best to hide Database names in URLs.

We’d like to be able to access this URL for example: http://server.name.com/database.nsf

by using http://server.name.com/Application1

We don want anyone to be able to see the actual file name.

How is that best handled?

Thanks!

Subject: Hiding / Masking Database / File Names in URLs

Your best bet is to use the replica ID… this way you’re a sure bet that the file name won’t be known.

create a base href with the following:

“http://” + @GetHTTPHeader(“Host”) + “/” + @ReplaceSubstring(@ReplicaID;“:”;“”) + “/”

This returns: http://server.name.com/1235432123424533/

Doing this, you can then base all of your database links off of the actual database:

open doc

becomes…

This also allows you to move the application from one directory to another without having the thing blow up, as well as move it to another server.

HTH,

-Chris

ps - if you need help setting the base href, let me know!

Subject: I’d use a URL mapping

you could have

/application1*

remap to

/database.nsf

that way your url will still appear as

http://server.name.com/appication1 etc.

Check in the Admin guide for info on how to set these up on the server.

Subject: Hiding / Masking Database / File Names in URLs

If you create virtual servers or virtual hosts, you can mask the filename with the mapping.

Let’s say your domino server is called Server A and you have HTTP running on the server.

http://servera.yourdomain.com is valid

404 page not found - bedpage.com is valid

You can create a virtual server or virtual host and register a new host name.

http://www.somethinghere.com

In the Home URL of the virtual host/server document, you point the virtual server to the desired database name.

Here we will use the example /apps/databaseb.nsf

So these are now valid URLs:

http://www.somethinghere.com/apps/databaseb.nsf

If you specify the Home URL in the virtual host/server document then http://www.somethinghere.com points automatically to /databaseb.nsf and masks the filename.

Be careful:

apps/databaseb.nsf in the home url field does point to the correct database, but does not hide the filename.

/apps/databaseb.nsf does mask the file name.

notice the preceding “/”