Vanity/Preferred URL

I used this one on my random midi player when it was on GeoCities. Since the window for the midi player is so small, it allows for the page to load without the watermark that appeared with the longer URL. This only works for GeoPlus users, though it can be adapted to other domains with two URLs for the same page. (And for the record, my GeoPlus URL shouldn't be working anymore!)

Our goal:
To switch a page from a long GeoCities Neighborhood URL to a "Vanity" URL.
For example: <>
to <>

Stuff in blue must be changed. For an "index" or "default" page, stuff in this color can be removed from the script entirely. The script can go between the <HEAD> and </HEAD> tags.

<SCRIPT LANGUAGE="JavaScript1.2">
var vanity = "yourusername"
var page = "yourpage.htm"

var geo = ""
var sl = "/"
var url = document.location.href

if (url.indexOf("~") == -1) {
document.location = geo + vanity + sl + page

Grab a text file of this JavaScript (right-click and save it as a text file).