SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    u.s.
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question can html form call a "friendly" url?

    I've been reading on SitePoint about the benefits of "friendly" or "clean" URLs (e.g. http://www.mysite.com/name/value/name2/value2) over URLs with query strings (e.g. http://www.mysite.com?name=value&name2=value2). While it's no problem to call a friendly URL from a link, I haven't seen a straightforward way to call one from an HTML form: the form wants to tack the parameters on as a query string. Is there a preferred way of doing this? A bit of Javascript, perhaps, or a modrewrite statement to convert the "dirty" URL to a "clean" one?

    Thanks,
    Mike

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    USA
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you use Post as the method instead of Get, it is clean. Right?
    .
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

  3. #3
    SitePoint Member
    Join Date
    Aug 2003
    Location
    u.s.
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Redhat_PHP,

    Thanks for replying. Yes, post keeps the query string off the end of the URL. I would like users to be able to bookmark the resulting page, though. Also, I'm using Adsense, and Google seems to consider a page's path to determine what ads to show. I would really prefer to have the parameters in the path.

    Mike


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •