Welcome to WebmasterWorld Guest from 3.227.249.234

Forum Moderators: phranque

Message Too Old, No Replies

Using PHP in Html pages?

Does Google see the difference?

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

New User

10+ Year Member

joined:Mar 19, 2007
posts:9
votes: 0


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)?

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

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 0


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

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

New User

10+ Year Member

joined:Mar 19, 2007
posts:9
votes: 0


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]

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

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:15177
votes: 177


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?
12:19 pm on Mar 20, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 0


>> 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

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

New User

10+ Year Member

joined:Mar 19, 2007
posts:9
votes: 0


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!