Jump to content

Shorter URL's


Sissy-n-CR

Recommended Posts

I'm wanting to put the cache URL directly on the cache and realized it would be so much easier if the URL were shorter. Maybe something like gcffff.geocaching.com or www.geocaching.com/gcffff.

It'd be easier for those who need to know about what the heck that box is before they have to blow it up.

 

Is there a way to make a shorter URL that I don't know about? Or am I going to have to resort to tinyurl.com?

 

CR

 

72057_2000.gif

Link to comment

quote:
Originally posted by Sissy-n-CR:

Maybe something like gcffff.geocaching.com or http://www.geocaching.com/gcffff.


The form "gcfff.geocaching.com" is logistically much much more difficult, though there's no reason why "geocaching.com/gcffff" or "geocaching.com/cache/gcffff" couldn't be done. At least I could do it easily with a Java web app server & apache. I'm not sure about Microsoft IIS, which is what geocaching.com is using.

Link to comment

quote:
Originally posted by timpaula:

The form "gcfff.geocaching.com" is logistically much much more difficult...


 

It is normally possible to setup the web server so that *.geocahing.com (* is anything) is redirected to a specific page.

 

Then you would only have to write a few lines of code to examine the full url the user requested, e.g. gc1234.geocahing.com and then redirect the user to that page.

 

I did that a few years back.

 

/Jesper

Link to comment

quote:
Originally posted by jep:

quote:
Originally posted by timpaula:

The form "gcfff.geocaching.com" is logistically much much more difficult...


 

It is normally possible to setup the web server so that *.geocahing.com (* is anything) is redirected to a specific page.


 

True, but only half of the story. Your DNS server also has to be set up to return CNAME records that point to www.geocaching.com for anything it doesn't recognize. Some DNS servers support that functionality and some don't. Besides, "http://geocaching.com/GC1234" is one less character than "http://GC1234.geocaching.com/" (yeah, I know, the last slash is optional. It also makes geocaching.com generate an extra redirect when you don't use it.)

 

warm.gif

Link to comment

I know that apache web servers can be set up so that URLs of a certain pattern can be 'morphed' into the actual URL. For example, you could set up the web server so that URLs that come in that look like http://geocaching.com/GC* get expanded to http://www.geocaching.com/seek/cache_details.aspx?WP=GC* on the fly.

 

--Marky

"All of us get lost in the darkness, dreamers learn to steer with a backlit GPSr"

Link to comment

quote:
Originally posted by Marky:

I know that apache web servers can be set up so that URLs of a certain pattern can be 'morphed' into the actual URL.


 

[ron@mail ron]$ HEAD www.geocaching.com

200 OK

Cache-Control: private

Connection: close

Date: Wed, 28 May 2003 17:59:01 GMT

Server: Microsoft-IIS/5.0

Content-Length: 27364

Content-Type: text/html

Expires: Wed, 28 May 2003 17:59:01 GMT

Client-Date: Wed, 28 May 2003 17:59:03 GMT

Client-Peer: 63.251.163.168:80

Client-Response-Num: 1

Set-Cookie: ASPSESSIONIDCACSCCCS=LGPCGPHDIBLIDCEFIMIDMFCO; path=/

 

icon_biggrin.gif

 

warm.gif

Link to comment

I actually wrote something in PHP to do this for you, although it was on one of my domains. However I used a php include(); and this sends a PHP/4.1.2 User-Agent line which geocaching.com seems to reject. (I tested this manually). I am lazy, and if it takes any more then using include(); I don't feel like doing it. If they would just turn off the "lets reject certain User-Agent headers" then this would be very simple. From what I gather from my short research you can't change the User-Agent in php unless you write your own connect/send/process/print routine - and like I said before I am lazy.

 

--Jason

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...