I'm a clean URL fanatic, some would say to the point of extremity. In fact, I would go so far as to say that, apart from images and other unusual media, that sites should not contain filename extensions at all.

The reason I despise extensions is that one day you have a simple HTML page called "something.html", which you later upgrade to, say, "something.phtml" when someone decides to use PHP on it. Now every single link to that page is broken, and has to be repaired or redirected. Later, perhaps, the page is modified again, this time into a CGI called "something.cgi" which breaks your links all over again.

If you use Apache's MultiViews, it will figure out what you mean without benefit of the extension. If you think this is too slow, use Squid as a turbocharger, but for low-mid volume sites it seems to work fine without any sort of accelerant.

I would even go so far as to specify a URL such as:     http://my.domain.com/script/1234 Which is about as basic as you can get. The '1234' will be passed via CGI to your application which can process it as you will. Further, you can make up your own format for the URL data, without worrying about '&' or '?'. As long as you use taint, and check carefully (as you should anyways), then you may find this a lot simpler, especially when many parameters make for an unwieldly URL.

In reply to Re: Clean URLs and CGI.pm by tadman
in thread Clean URLs and CGI.pm by swiftone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.