I'm unable to Google for this feature, because I don't know what it's called!
I'm referring to the use of something short like
http://www.domain.co.uk/thispage
(no .htm or .html ending) which the user can specify instead of a huge great URL like
http://www.domain.co.uk/upperlevel/medi ... spage.html
What needs to be done on a website to enable this form of redirection? (Simple explanations only, please, to match understanding!)
Thanks!
How do you create 'short URLs'?
-
- PlatinumLounger
- Posts: 5411
- Joined: 24 Jan 2010, 08:33
- Location: A cathedral city in England
How do you create 'short URLs'?
John Gray
"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...
"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...
-
- Administrator
- Posts: 7210
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: How do you create 'short URLs'?
If you have a sub-directory called (e.g.) /this page and have a file there called 'default.htm', this page will be automatically loaded (in the same way as the default page for any website can load).
You could therefore have a 'default.htm' or ('default.html') which includes a redirection script in the <head> section to a specific page, e.g.:
Is that the sort of thing you mean?
Or are you thinking of something like TinyURL.com - shorten that long URL into a tiny URL?
You could therefore have a 'default.htm' or ('default.html') which includes a redirection script in the <head> section to a specific page, e.g.:
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
window.location.replace ("http://www.domain.co.uk/upperleve/mediumlevel/lowerlevel/evenlowerlevel/pagestore/thispage.html");
</script>
Or are you thinking of something like TinyURL.com - shorten that long URL into a tiny URL?
Leif
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How do you create 'short URLs'?
Here is a long Wikipedia article about the subject: URL redirection. Depending on your setup, you may want to look at the section Using .htaccess for redirection (for Apache web servers) or Refresh Meta tag and HTTP refresh header.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 5411
- Joined: 24 Jan 2010, 08:33
- Location: A cathedral city in England
Re: How do you create 'short URLs'?
Thanks to you both! We already use bit.ly, and formerly tinyurl, but people have complained that it isn't easy to determine the real URL from these shortened forms, so we wanted to have our website as the major component of the URL, to encourage trust.
The JavaScript example seems a neat trick, but for the resultant proliferation of directories. URL Shortening seems to be the magic phrase. together with redirection. More reading required of the links supplied...
The JavaScript example seems a neat trick, but for the resultant proliferation of directories. URL Shortening seems to be the magic phrase. together with redirection. More reading required of the links supplied...
John Gray
"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...
"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...