dreamwest Posted November 25, 2008 Share Posted November 25, 2008 why name pages with different extensions when it comes to php,html,htm,shtml i mean if you have a php page youve stilll gotta use <?php ?> tags within php coding as you would with shtml pages whats the point! I can understand renaming html to shtml considering shtml pages are text based, meaning better indexing, but php still boggles my fragile little mind..?!!? Quote Link to comment https://forums.phpfreaks.com/topic/134172-why-name-pages-with-different-extensions/ Share on other sites More sharing options...
zq29 Posted November 25, 2008 Share Posted November 25, 2008 Apache is generally configured to only run files with the .php extension through the PHP interpreter. You can configure it to parse .html files too, but why waste system resources on files that aren't going to require it? I guess there are a number of reasons, efficiency (as outlined above), ease of identifying a files content without opening it, files can automatically be opened in an application that supports it without a "middleman" checking the file first to find a suitable app based on its content, et cetera. Quote Link to comment https://forums.phpfreaks.com/topic/134172-why-name-pages-with-different-extensions/#findComment-698529 Share on other sites More sharing options...
Daniel0 Posted November 25, 2008 Share Posted November 25, 2008 I can understand renaming html to shtml considering shtml pages are text based The difference between .html and .shtml is that the latter will support SSI (Server-side includes), .html will not. It will be like that on standard configurations at least. Quote Link to comment https://forums.phpfreaks.com/topic/134172-why-name-pages-with-different-extensions/#findComment-698600 Share on other sites More sharing options...
tibberous Posted November 25, 2008 Share Posted November 25, 2008 HTML may rank better with SE's, but even then you have to rewrite it, since index.html?page=home isn't any better than the PHP equivalent. SemiApocalyptic is right about the performance, but I find I never have any straight html pages anyway. Quote Link to comment https://forums.phpfreaks.com/topic/134172-why-name-pages-with-different-extensions/#findComment-698921 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.