Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
.php or .html extension? Morally Static Pages

You'll find many pages on our web site with .php extensions, and many more with .html extensions. "So the .php files contain executable content and the .html files do not" you may think. No - not exactly; in practise almost every page actually contains some PHP / Script elements. So WHAT, WHY, HOW?

WHAT ... All pages which contain data which is essentially unchanging have extensions that end in .html, but pages which are essentially dynamic are classified as .php.

I describe the pages that are unchanging as Morally Static Pages, and examples might include /share/prisonbridge.html and /mouth/17_Differing-tastes.html, both of which are generated from databases; in essence they don't ever change a great deal unless I modify the content, but you will see small changes from time to time in the list of nearby places on the Prison Bridge page, or in the "see also" column of the Differing Tastes page.

We have a number of truly dynamic pages. For example our Site Map Page will change to give you a site map relative to your current location each time you call it up, and our Image Library Search will vary depending on what pictures have recently been added and what you're searching for.

WHY ... If you are looking for a page, then you'll feel confident that a .html file is one that you can bookmark, come back to - a simple soul that's going to vary little and you can rely on to stay the same until the site owner changes it. By contrast, if you find a page that's saying that it's dynamic, it probably is and you'll treat it with a degree more respect. You may bookmark it, but you'll be aware that results may change rather more frequently, and you'll treat it with rather more circumspection.

The same thing applies to the best search engine crawlers, I think. In amongst all the various factors they take into account, they'll look at how often a page changes / is likely to change and the extension offers a good clue. So the application of different extensions is an aid to them as they're indexing your page too, helping them to categorise as appropriate.

HOW ... We're using the .htaccess file and Apache httpd's mod_rewrite to provide the facilities that we need. At the very simplest, a line such as
AddType application/x-httpd-php .html
added to the httpd.conf (or appropriate .htaccess) file(s) will trigger the web server to parse all .html files in case they contain PHP. In a more extreme case, a directive such as
RewriteRule ^(.*)\.htm /share/index.php?pagename=$1
will take all .html and .htm requests and divert them to index.php, with a parameter called pagename being passed in. This is the basis under which a whole directory of Morally Static Pages can be generated on the run, without there being a single truly static page present at all.
(written 2007-09-17, updated 2007-09-18)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
W603 - Web and Intranet - Server Side Technologies
  [642] How similar are two words - (2006-03-11)
  [653] Easy feed! - (2006-03-21)
  [732] Where is a web site visitor browsing from - (2006-05-24)
  [1020] Parallel processing in PHP - (2007-01-03)
  [1031] robots.txt - a clue to hidden pages? - (2007-01-13)
  [1365] Korn Shell scripts on the web - (2007-09-25)
  [1554] Online hotel reservations - Melksham, Wiltshire (near Bath) - (2008-02-24)
  [1615] PHP training courses every month - (2008-04-18)
  [1749] Using server side and client side programming together - (2008-08-11)
  [2055] Effect on server when memory runs out and swapping starts - (2009-02-26)
  [2282] Checking robots.txt from Python - (2009-07-12)
  [3705] Django Training Courses - UK - (2012-04-23)
  [3915] How does PHP work? - (2012-11-07)
  [4277] Sending a message to the server and changing text on a page when a button is pressed - (2014-05-23)

H112 - PHP - Further Web Page and Network Handling
  [220] When to use Frames - (2005-02-19)
  [314] What language is this written in? - (2005-05-17)
  [345] Spotting a denial of service attack - (2005-06-12)
  [356] Sudoku helper or sudoku cheat - (2005-06-23)
  [372] Time calculation in PHP - (2005-07-08)
  [376] What brings people to my web site? - (2005-07-13)
  [410] Reading a news or blog feed (RSS) in your PHP page - (2005-08-12)
  [425] Caching an XML feed - (2005-08-26)
  [443] Server side scripting of styles to suit the browser - (2005-09-12)
  [451] Accessing a page via POST from within a PHP script - (2005-09-26)
  [484] Setting the file name for a downloaded document - (2005-11-03)
  [537] Daily Image Santafied - (2005-12-22)
  [542] Morning image, afternoon image - (2005-12-26)
  [565] Using PHP to output images, XML, Style sheets, etc - (2006-01-15)
  [603] PHP - setting sort order with an associative array - (2006-02-13)
  [675] Adding PHP tags to an old cgi program - (2006-04-08)
  [767] Finding the language preference of a web site visitor - (2006-06-18)
  [789] Hot answers in PHP - (2006-07-02)
  [847] Image maps for navigation - a straightforward example - (2006-08-28)
  [904] Of course I'll tell you by email - (2006-10-25)
  [936] Global, Superglobal, Session variables - scope and persistance in PHP - (2006-11-21)
  [1009] Passing GET parameters through Apache mod_rewrite - (2006-12-27)
  [1114] PHP Image upload script - (2007-03-21)
  [1183] Improving searches - from OR to AND? - (2007-05-11)
  [1187] Updating a page strictly every minute (PHP, Perl) - (2007-05-14)
  [1210] PHP header() function - uses and new restrictions - (2007-05-30)
  [1379] Simple page password protection - PHP - (2007-10-04)
  [1485] Copyright and theft of images, bandwidth and members. - (2007-12-26)
  [1495] Single login and single threaded models - Java and PHP - (2008-01-04)
  [1496] PHP / Web 2 logging - (2008-01-06)
  [1505] Script to present commonly used images - PHP - (2008-01-13)
  [1515] Keeping staff up to date on hotel room status - (2008-01-22)
  [1518] Downloading data for use in Excel (from PHP / MySQL) - (2008-01-25)
  [1549] http, https and ajp - comparison and choice - (2008-02-22)
  [2632] Shipping a test harness with your class in PHP - (2010-02-12)
  [2679] How to build a test harness into your PHP - (2010-03-16)
  [2729] Uploading a document or image to its own URL via a browser - (2010-04-18)
  [2918] Downloading a report from the web for further local analysis - (2010-08-13)
  [3036] Sending out an email containing HTML from within a PHP page - (2010-11-07)
  [3432] 3 digit HTTP status codes - what are they, which are most common, which should be a concern? - (2011-09-11)
  [3540] Easy session example in PHP - keeping each customers data apart - (2011-12-06)
  [3568] Telling which ServerAlias your visitor used - useful during merging domains - (2012-01-04)
  [3918] Multiple page web applications - maintaining state - PHP - (2012-11-10)
  [4070] Passing variable between PHP pages - hidden fields, cookies and sessions - (2013-04-26)
  [4483] Moving from mysql to mysqli - simple worked example - (2015-05-03)

A603 - Web Application Deployment - Further httpd Configuration
  [466] Separating 'per instance' data from binaries and web sites - (2005-10-16)
  [526] Apache httpd - serving web documents from different directories - (2005-12-12)
  [550] 2006 - Making business a pleasure - (2006-01-01)
  [631] Apache httpd to Tomcat - jk v proxy - (2006-03-03)
  [649] Denial of Service ''attack'' - (2006-03-17)
  [662] An unhelpful error message from Apache httpd - (2006-03-30)
  [755] Using different URLs to navigate around a single script - (2006-06-11)
  [853] To list a directory under httpd on a web server, or not? - (2006-09-02)
  [934] Clustering, load balancing, mod_rewrite and mod_proxy - (2006-11-21)
  [1080] httpd.conf or .htaccess? - (2007-02-14)
  [1121] Sharing the load with Apache httpd and perhaps Tomcat - (2007-03-29)
  [1207] Simple but effective use of mod_rewrite (Apache httpd) - (2007-05-27)
  [1351] Compressing web pages sent out from server. Is it worth it? - (2007-09-14)
  [1377] Load Balancing with Apache mod_jk (httpd/Tomcat) - (2007-10-02)
  [1381] Using a MySQL database to control mod_rewrite via PHP - (2007-10-06)
  [1551] Which modules are loaded in my Apache httpd - (2008-02-23)
  [1564] Default file (MiMe types) for Apache httpd and Apache Tomcat - (2008-03-04)
  [1566] Strange behaviour of web directory requests without a trailing slash - (2008-03-06)
  [1619] User and Group settings for Apache httpd web server - (2008-04-22)
  [1636] What to do if the Home Page is missing - (2008-05-08)
  [1707] Configuring Apache httpd - (2008-07-12)
  [1762] WEB-INF (Tomcat) and .htaccess (httpd) - (2008-08-20)
  [1767] mod_proxy and mod_proxy_ajp - httpd - (2008-08-22)
  [1778] Pointing all the web pages in a directory at a database - (2008-08-30)
  [1939] mod_proxy_ajp and mod_proxy_balancer examples - (2008-12-13)
  [1954] mod_rewrite for newcomers - (2008-12-20)
  [1955] How to avoid duplicating web page maintainance - (2008-12-20)
  [1974] Moving a directory on your web site - (2009-01-03)
  [2060] Database connection Pooling, SSL, and command line deployment - httpd and Tomcat - (2009-03-01)
  [2272] Monitoring and loading tools for testing Apache Tomcat - (2009-07-07)
  [2478] How did I do THAT? - (2009-10-26)
  [2900] Redirecting a page - silent, temporary or permanent? - (2010-08-03)
  [3133] An image from a website that occasionally comes out as hyroglyphics - (2011-01-14)
  [3449] Apache Internal Dummy Connection - what is it and what should I do with it? - (2011-09-19)
  [3635] Parse error: parse error, unexpected T_STRING on brand new web site - why? - (2012-03-03)
  [3862] Forwarding a whole domain, except for a few directories - Apache http server - (2012-09-17)
  [3955] Building up from a small PHP setup to an enterprise one - (2012-12-16)
  [4001] Helping search engines with appropriate 400 error codes - (2013-02-11)
  [4307] Identifying and clearing denial of service attacks on your Apache server - (2014-09-27)


Back to
Match the Bedroom to the Hotel
Previous and next
or
Horse's mouth home
Forward to
Crystal Ball - How long do I need to be online?
Some other Articles
Little Gems but not Lettuce
Look forward with a new broom - Wiltshire Train Service
Clean my plate, but keep my wine bottle. (PHP; Static)
Crystal Ball - How long do I need to be online?
.php or .html extension? Morally Static Pages
Match the Bedroom to the Hotel
Mood shots
Actionscript / Flash / Flex (IAQ/FAQ)
FSB (Federation of Small Businesses) Western Region
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2021: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1355_-ph ... Pages.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb