Using a URL as an abbreviation

4

418928

Hi everybody,

I have a certain document in a URL X quite difficult to remember and
write. So I want to provide a shortcut to it (let's call this Y). My
current solution is the following. In the html page pointed to by Y, I
write:

<META HTTP-EQUIV="Refresh"
CONTENT="0;
URL=X"
This works well. However, I'm not sure if all the web browsers will
understand this (I tried with Explorer and Opera) and whether this is
the best way of achieving my purpose.

Thanks in advance for any suggestion,
Sergio
 
J

J.O. Aho

Hi everybody,

I have a certain document in a URL X quite difficult to remember and
write. So I want to provide a shortcut to it (let's call this Y). My
current solution is the following. In the html page pointed to by Y, I
write:

<META HTTP-EQUIV="Refresh"
CONTENT="0;
URL=X"

This works well. However, I'm not sure if all the web browsers will
understand this (I tried with Explorer and Opera) and whether this is
the best way of achieving my purpose.

Most browsers does understand meta tag redirections, you can also use the
header() function in PHP (server side scripting language), but the the best
may be to do this at the server level, but quite few has the privilege to do
so, so your method is really a okey way to do it, as long as you include the
ending ">" (if using xhtml, "/>") to the tag.
 
T

Toby A Inkster

<META HTTP-EQUIV="Refresh"
CONTENT="0;
URL=X"

This works well. However, I'm not sure if all the web browsers will
understand this (I tried with Explorer and Opera) and whether this is
the best way of achieving my purpose.

It is a better idea to use HTTP redirects by sending a "301 Permanent
Redirect" header.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
 
J

J.O. Aho

Hi David,


Interesting... but where should I type the Apache's redirect
directive? I'm confused about that. I only have access to my
directory, not to the global Apache's configuration. Is that a problem
for this?

if the system admin has enabled htaccess, you just place it in the .htaccess
in the directory where the file should have been. You can read more about it
at http://wsabstract.com/howto/htaccess.shtml
 
4

418928

if the system admin has enabled htaccess, you just place it in the .htaccess
in the directory where the file should have been. You can read more about it
athttp://wsabstract.com/howto/htaccess.shtml

Thanks, that's very useful. But I think the use of .htaccess is not
enabled, as I cannot get any of its functionalities. Is there any way
I can know if htaccess is enabled or not (other than seeing that it
seems not to work)?

Sergio
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top