DIY Tiny URL?

D

David Segall

I sometimes I post or email a link to a page on my web site. I would
like to make it as short as possible but don't want to use
<http://tinyurl.com/>. I would prefer to put the ultimate location for
all the likely places on one html page. Ideally it the link would be
something like "mystite.com#gohere". Any suggestions?
 
B

Blinky the Shark

David said:
I sometimes I post or email a link to a page on my web site. I would
like to make it as short as possible but don't want to use
<http://tinyurl.com/>. I would prefer to put the ultimate location for
all the likely places on one html page. Ideally it the link would be
something like "mystite.com#gohere". Any suggestions?

I don't know if this is useful for you, but if you register at
http://snipurl.com, you can name your shortened links (and they're saved
in your account, where you can see hit stats, change the name, etc.).

So you could have:

http://snipurl.com/davids_cats
http://snipurl.com/davids_poetry
http://snipurl.com/davids_porn

....and so on. Tinyurl domain, but with your custom names.

Reg is free and not invasive, and I've never seen any spam from them.

It's a nice service.
 
D

Dan

David said:
I sometimes I post or email a link to a page on my web site. I would
like to make it as short as possible but don't want to use
<http://tinyurl.com/>. I would prefer to put the ultimate location for
all the likely places on one html page. Ideally it the link would be
something like "mystite.com#gohere". Any suggestions?

With hosting providers that let you create unlimited subdomains with
redirects (Dreamhost does, for instance) you can set up
link1.example.net, link2.example.net, and so on. Or, as somebody else
suggested, you can do path-based redirects from example.net/link1,
etc., using a .htaccess file (if it's an Apache server).
 
R

Rob McAninch

David Segall>:
I sometimes I post or email a link to a page on my web site. I would
like to make it as short as possible [...] Any suggestions?

Well if you do this with a lot of links. Run them through a database.

e.g. example.com/link?0001

Where 0001 gets looked up in a database for its actual location. You
could do it with Perl/PHP and MySQL or perhaps a simpler database or
even a flat text file (but I'd look into using the Perl DBI from the
beginning so you have room to grow from a text file to a RDBMS.
 
B

Benjamin Niemann

David said:
I sometimes I post or email a link to a page on my web site. I would
like to make it as short as possible but don't want to use
<http://tinyurl.com/>. I would prefer to put the ultimate location for
all the likely places on one html page. Ideally it the link would be
something like "mystite.com#gohere". Any suggestions?

If your website is hosted on an apache server, you could put lines like

Redirect /shorturl http://www.example.org/this/is/the/long/url.html

into you're .htaccess file.
 
D

David Segall

Dan said:
With hosting providers that let you create unlimited subdomains with
redirects (Dreamhost does, for instance) you can set up
link1.example.net, link2.example.net, and so on.
Thanks Dan, this works for me. I'm actually using ZoneEdit
<http://www.zonedit.com/> because I don't have a fixed IP address and
because it is free. I had already taken advantage of it's email
forwarding but you inspired me to check it's subdomain forwarding.
Or, as somebody else
suggested, you can do path-based redirects from example.net/link1,
etc., using a .htaccess file (if it's an Apache server).
I'm using Tomcat. I'll check out their options.
 
V

Vhit

<alt.html , Rob McAninch , (e-mail address removed)>
<[email protected]>
I sometimes I post or email a link to a page on my web site. I would
like to make it as short as possible [...] Any suggestions?

Well if you do this with a lot of links. Run them through a database.

e.g. example.com/link?0001

Where 0001 gets looked up in a database for its actual location. You
could do it with Perl/PHP and MySQL or perhaps a simpler database or
even a flat text file

(below) I started at 1000000 and used flatfiles .

Its not a high traffic website and no need to use mysql at this stage .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top