Redirect

If you have not yet migrated your personal home page to the new server then this feature will not work! Please set up the redirect after you have migrated your personal web page according to the instructions here.

If you already have a personal home page and simply want https://people.inf.ethz.ch/[your user name] to redirect to that, then you can configure this in the file .htredirect in the top level directory of your web home:

This file is already present in your web home directory, contains similar instructions as below and can be edited on web-login.inf.ethz.ch with your favorite command line text editor.

Enable Redirect

To activate a redirect add the following line to ~/.htredirect:

immediate: https://[your server]

or

immediate: https://[your server]/directory

The redirect will be active immediately after adding or editing the immediate: line and saving ~/.htredirect.

Do not use quotes or HTML escapes for the URL.

Serving Local Files

URLs for files and directories that exist in ~/public_html will not be redirected, instead they are processed normally.

This allows you to use your personal home page to publish data while still having a general redirection. If you want to avoid this behavior then please empty the ~/public_html directory completely.

Permanent Redirect when Leaving ETH

To register a redirect that will be used when your web home account is deleted add the following line to ~/.htredirect:

onleaving: https://[your server]

or

onleaving: https://[your server]/directory

If an immediate redirect is also present then that will take precedence and will be used as final redirect URL.

Redirect with Path

By default the requests for any document in your personal home page redirect to the one URL that you specify. If you want to redirect with the individual document paths preserved then add the following line to ~/.htredirect

appendpath: True

Redirecting with full paths makes sense if a clone of your D-INFK home page is located at the redirect URL.

Query Strings

If you have PHP pages that use query strings (everything following a question mark in the URL such as ?foo=bar&qux=baz) then these are passed through unless the redirect URL has a single question mark appended to indicate an empty query string. The appended question mark is removed during the redirect.

The question mark cannot follow a slash so make sure that your remove any trailing slashes and that the redirect looks like this:

onleaving: https://[your server]?

or

onleaving: https://[your server]/directory?

Passing through makes sense if a clone of your D-INFK home page is located at the redirect URL and appendpath is set to True. If you had PHP scripts and redirect to one URL then add the question mark.

Page URL: https://www.isg.inf.ethz.ch/bin/view/Main/HelpWebPersonalHomePageRedirect
2024-04-15
© 2024 Eidgenössische Technische Hochschule Zürich