I really like how in PHP you can include another file, and it drops that code into the webpage. Like when you have a menu, you just add the menu code to menu.php and include that file in the proper place in all your webpages. I have an HTML file, and I was wondering if I could do the same thing. Say I have a header and menu, and I want to drop that on each HTML page, but I don't want to add the code to each page. I want the code in one place, and then when I need to make changes, I just change the one file. It is probably something that can't be done, or probably something very simple that I am overlooking.
This doesn't work by default, BUT there are a few workarounds. Create an .htaccess file and place this inside: AddType application/x-httpd-php .html .htm .php Code (markup): Now PHP will parse all HTML files too (which makes it a bit slower), but you can use your regular include() in HTML files. And another method is using SSI. But you have to change your HTML extensions to .shtml <!--#include file="file.html" --> Code (markup):
I guess you can: <!--#include virtual="includes/tab_nav.inc"--> Code (markup): Just read nico's comment. The example I see of this is ASP.NET, so .aspx page. I will have to try it in HTML.
I think it'd be better if you just renamed your .html file to .php, since that seems a bit complicated, and impractical since parsing all HTML files is.. well, impractical.
How can it be that parsing files that don't even have any code, except for a few, be of any help to SEO? Unless you mean .html over .php, in that case, I've never heard of that, but it doesn't seem practical to try and keep your website's speed as fast as you can.