Re: Text-links using POST ?
- From: Chris Morris <c.i.morris@xxxxxxxxxxxx>
- Date: 08 Sep 2006 18:33:00 +0100
"Trammel" <Me@xxxxxxxxxx> writes:
Hi, Im just about to start developing a new website for personal / friend
use that may be accessed by other people all over the web. I was sitting
thinking through designs for the pages, etc when I came across a thought....
...why show the visitor loads of junk just because Im using A-href type
links?
Is there a way to create a text-link that will request a page using POST
instead of GET?
Maybe from within a form or using CSS to modify the behavior of links?
It's do-able, somewhat unreliably, with Javascript. *However*, there
are better ways to do this sort of thing (especially since
POST-retrieved pages can't be bookmarked, can't be retrieved by search
engines, generate browser warnings on reload, and have other
undesirable properties for things that you actually want to GET)
What you're really asking is: Can I have neater looking URLs for GET?
The answer is yes - either by modifying the web pages a bit to take
better URLs, or by using mod_rewrite to convert between a nice and an
ugly form [1].
Can you give a bit more details about the page, and about the sort of
URLs you've currently got? Best of all, if development's far enough
ahead, can you give us a URL for it? If not, what about a URL for
something similar?
[1] For example:
RewriteRule ^([a-zA-Z0-9\ -]+)/([0-9]+)/.* /?category=$1&article=$2 [PT]
rewrites a requested URL of the form
/articles/101/writing_HTML
to a server-processed URL of
/?category=articles&article=101
--
Chris
.
- Follow-Ups:
- Re: Text-links using POST ?
- From: Trammel
- Re: Text-links using POST ?
- References:
- Text-links using POST ?
- From: Trammel
- Text-links using POST ?
- Prev by Date: Re: Text-links using POST ?
- Next by Date: Re: Text-links using POST ?
- Previous by thread: Re: Text-links using POST ?
- Next by thread: Re: Text-links using POST ?
- Index(es):
Relevant Pages
|