Redirects are possible using the following in iPlanet 6.1 and iPlanet 7.x:

Edit the obj.conf file and add

Output fn=”set-variable” error=”301″ noaction=”true”

after the line.

Now, any redirects you do in your obj.conf will be reported as 301’s.

A couple of other options you can use in the obj.conf:

Lets say you own domain aha.org, then one day your site name was published in USA Today as heart.org. Register heart.org and update the DNS to point to your aha.org web server.

Now you could create a new VS for heart.org but why have a second configuration to manage.

In the obj.conf for aha.org you can do this to redirect heart.org to the correct domain.

NameTrans fn=”redirect” from=”/” url=”http://www.aha.org/”

Now that is cool, you are doing all 301 redirects so your search engine rankings are good, you have a single web configuration that will answer for both aha and heart.

But what if a person typed in the incorrect published page with some uri path after the FQDN: i.e. http://www.heart.org/healnow The above will just put the requester back to the home page on aha.org.

NameTrans fn=”redirect” from=”/” url-prefix=”http://www.aha.org/”

NOTE: You would add this ABOVE the previous fix: the order is important, the uri=”*” MUST come AFTER uri=”??*”

This second redirect you will notice has a url-prefix= option, this code bit states, if you see a request for http://www.heart.org/(any two characters plus any thing else) do a redirect replacing http://www.heart.org with ww.aha.org and keep the remaining url.
For example: http://www.heart.org/buymenow will become
http://www.aha.org/buymenow

so your new obj.conf would look something like this now:

Output fn=”set-variable” error=”301″ noaction=”true”

NameTrans fn=”redirect” from=”/” url-prefix=”http://www.aha.org/”

NameTrans fn=”redirect” from=”/” url=”http://www.aha.org/”

AuthTrans fn=”match-browser” browser=”*MSIE*” ssl-unclean-shutdown=”true”
NameTrans fn=”ntrans-j2ee” name=”j2ee”
…rest of the config file…

With this configuration, you can answer for a different domain names without having to run a second (or more) virtual server(s). If the request is for the home page, serve the home page. If the request is for anything after the FQDN, preserve that while rewriting the FQDN portion. And for all redirects issue a 301 so we get the page ranking for heart as if it were aha.org.