Forum Moderators: phranque

Message Too Old, No Replies

Using PHP in Html pages?

Does Google see the difference?

         

vinco01

5:37 pm on Mar 19, 2007 (gmt 0)

10+ Year Member



My site is a static HTML one runing Movable Type 3.34. Recently I tryed to use Text Link Ads, but it only uses PHP code to serve the ads. Questions:

Can I keep HTML extension in my pages (ranking well in G indexes) and still serve PHP code? Maybe using SSI and adding a few lines to my .htaccess?
Can this affect my ranking (i.e., can google think my pages have changed for being served as PHP)?

jatar_k

5:43 pm on Mar 19, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld vinco01,

>> Can I keep HTML extension in my pages and still serve PHP code?

absolutely, it requires a change to your apache httpd.conf if you are on shared hosting the question to ask them would be

"Can I turn on php parsing for the html extension"

it is usually no big deal

>> Can this affect my ranking?

not at all

vinco01

7:06 pm on Mar 19, 2007 (gmt 0)

10+ Year Member



Thanks Jatar,

>> the question to ask them would be "Can I turn on php parsing for the html extension"

As I'm not renaming my index files to shtml, I think I'll go for the .htaccess approach, but...

>> it is usually no big deal

For newbies on SSI and PHP, it _is_ kind of a big deal :(

Could you explain (or point to other resources) how to do it? Something like:

<body>
PHP tags to call my PHP file, or maybe the PHP code itself...
</body>

... also, the

AddHandler server-parsed .html 

directive for the .htaccess file doesn't seems to work. Is it ok as it is? Shouldn't be .php instead?

[edited by: txbakers at 7:56 pm (utc) on Mar. 19, 2007]
[edit reason] no links to webhosting URLs per TOS. [/edit]

bill

2:03 am on Mar 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are quite a few threads here that cover the issue of parsing HTML as PHP [google.com]. Maybe one of them could provide you with the specifics you're looking for?

jatar_k

12:19 pm on Mar 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> it is usually no big deal

For newbies on SSI and PHP, it _is_ kind of a big deal sad

apologies, I was referring to the fact that for most hosts it isn't a big deal

the best thing to do first is to contact your host and see if they allow it and will do it for you

vinco01

4:56 am on Mar 21, 2007 (gmt 0)

10+ Year Member



Jatar and bill

Thanks a lot for your time; I've realized it wasn't that hard ;) after all.

I just needed to know the right way to look for this info.

cheers!