Is there any method by which we can add another page into the HTML Page without using IFRAME ? Javascript can be used but the links in it cant be followed by robots. php include is best and its for .php files, But I want to use only .html or .htm as extension.. using .htaccess to parse html as php and adding php include code will result in invalid markup validation in w3 validator. So is there any other method by which i can just add a line of code for header and footer into the html pages. Please tell me.
only way I know to do this to still make the pages parse html is to use php and then smarty code as a template for it other than that if all you have is a huge amount of html pages, you might need to convert them all to php or something. There are some conversion tools you can search google and find to do this. Make sure you find one that will update links to the new extensions, because you dont want to have to do that manually or even find/replace. Also make sure you have some 404 pages setup after you do this conversion if you, cuz your pages will drop out of search engines
What he means is that you can tell the server to process ( parse) html pages like they are PHP. You still have html as the extension but you can use PHP code on the pages. I do this on more than one of my sites. The actual syntax for the .htaccess file will vary a little depending on the PHP vesion and wheter or or not suexec is used. I hate smarty and would never use it.
My website contains a max of 50 pages... But if we make the html to be parsed as php, will it get validated correctly in w3 validator? It may show the php tags <? as validation errors ? ? ? has anyone validated the html pages which is been parsed as php ?
PHP: Not if you call the correct document type. Mine had errors, not that I care but that wasn't one of them. I could clean up the displayed errors, mostly <br> instead of <br /> and it would validate. Here read it for yourself. Add http:// to the contents of the text box below: validator.w3.org/check?uri=http%3A%2F%2Fmy-e-space.com&charset=%28detect+automatically%29&doctype=Inline&group=0 PHP: