tr3x86 Posted August 29, 2008 Share Posted August 29, 2008 Hello All, I have a quick question that I'm sure you guys could answer instantly... I'm building a website in HTML. I have a couple of forms, but want to be more dynamic in the way they're handled and emailed. PHP does a pretty good job of executing nice form mailing. What I'm not sure about... in your experience, can you think of any problems in terms of performance, SEO, etc. if the website has mixed page extensions? Example: index.html about.html contact.php product.html Any input would be greatly appreciated. Thanks, Tyler Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/ Share on other sites More sharing options...
BlueSkyIS Posted August 29, 2008 Share Posted August 29, 2008 I try to stick to one extension. it's okay to name all pages .php even if they have no php in them. alternatively, you can use .htaccess to force apache to parse .html like .php, and thus use .html on all files, even php files. Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629193 Share on other sites More sharing options...
tr3x86 Posted August 29, 2008 Author Share Posted August 29, 2008 See... instantly! I think I understand what you mean. Is it possible to have that one file with a .php extension and then use the .htaccess to parse it back to .html? Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629199 Share on other sites More sharing options...
BlueSkyIS Posted August 29, 2008 Share Posted August 29, 2008 .php extension will be parsed as .html except where php tags are encountered: filename: somefile.php <HTML> <BODY> Hello World<BR> <?php echo 'Hi, How Are You?<BR>'; ?> <B>I'm fine. How are you?</B><BR> </BODY> </HTML> you shouldn't need to do anything with .htaccess to use HTML in your PHP files, using .php extension everywhere. Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629208 Share on other sites More sharing options...
Fadion Posted August 29, 2008 Share Posted August 29, 2008 BlueSkyIS, shouldn't (X)HTML tags and attributes be lowercase? Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629211 Share on other sites More sharing options...
DarkWater Posted August 29, 2008 Share Posted August 29, 2008 BlueSkyIS, shouldn't (X)HTML tags and attributes be lowercase? Yes, always. Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629213 Share on other sites More sharing options...
BlueSkyIS Posted August 29, 2008 Share Posted August 29, 2008 i never knew and never noticed a difference. but if that's the standard, i'll switch. fo shizzle: http://www.htmlbasictutor.ca/html-tag-attributes.htm thanks for pointing that out, folks. learn something new (at least) every day. Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629220 Share on other sites More sharing options...
DarkWater Posted August 29, 2008 Share Posted August 29, 2008 i never knew and never noticed a difference. but if that's the standard, i'll switch. fo shizzle: http://www.htmlbasictutor.ca/html-tag-attributes.htm thanks for pointing that out, folks. learn something new (at least) every day. It's the standard, yes. It doesn't have the same meaning in XHTML because of case-sensitivity. Have you tried validating your pages? Link to comment https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.