SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Database-driven pages w/ ".html" extension?

    Hi,

    I'm new to databases....

    I am just curious how some web sites create database-driven pages with ".html" extensions (instead of .asp, .cfm, .php, etc.). What language is used to do this?
    Is there an advantage to keeping your pages as .html, as opposed to .php, .asp, .cfm.....more search engine friendly??

    Here is an example of what I'm talking about:
    Database-driven .html ??


    Thanks,
    -G

  2. #2
    SitePoint Zealot pionar's Avatar
    Join Date
    Nov 2003
    Location
    Indianapolis
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    without looking at the site too closely, my guess is that either they are generating the static pages with a script (a la movable type) or they have finagled their server configuration to have .html pages interpreted by php, perl, or whatever.

    Or, they are using symlinks and/or URL rewriting techniques provided by apache's mod_rewrite *.html points to *.php or cgi or whatever.

    The first two ways would be more search-engine friendly, yes, as the bot wouldn't have to handle ugly urls like "show.php?itemID=46548418&location=carlsbad" etc.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pionar
    without looking at the site too closely, my guess is that either they are generating the static pages with a script (a la movable type) or they have finagled their server configuration to have .html pages interpreted by php, perl, or whatever.

    Or, they are using symlinks and/or URL rewriting techniques provided by apache's mod_rewrite *.html points to *.php or cgi or whatever.

    The first two ways would be more search-engine friendly, yes, as the bot wouldn't have to handle ugly urls like "show.php?itemID=46548418&location=carlsbad" etc.

    Ah, I get it!
    Thanks.

  4. #4
    Phil fillup07's Avatar
    Join Date
    May 2002
    Location
    Jacksonville, FL
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best way to do it, however, is to not have .html
    instead, have NO extension:
    and change something like:
    show.php?itemID=46548418&location=carlsbad
    to
    /show/46548418/carlsbad/

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fillup07
    The best way to do it, however, is to not have .html
    instead, have NO extension:
    and change something like:
    show.php?itemID=46548418&location=carlsbad
    to
    /show/46548418/carlsbad/

    Can this be done w/ Windows, or do you have to use the Apache mod_rewrite technique? I'm running Win 2K Server.

    Any tut links?

    Thanks.

  6. #6
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could you just tell the server to parse files with extension .html as php or asp? I know it does not clean up the querystring however.
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  7. #7
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    simple use an .htaccess file and add this line of code to it and html pages will be parsed as php pages.

    <Files *.html>
    AddType application/x-httpd-php .html
    </Files>


    i love php


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
  •