Welcome to WebmasterWorld Guest from 188.8.131.52
Can someone explain how the search engines will handle the following?
1 - When I use an "include" statement in my file (the file is named index.php3) -- what does the search engine actually read? Just the code that displays in the View Source page at the browser -- or all the php code from the include file and other php code in the file? Since the php code does not display in the browsers View Source -- I was thinking the search engine does not read this code -- but only the code I am actually seeing in the View Source page?? I am trying to determine how much code the search engine is actually reading through before seeing my key terms on the page.
2 - Is it OK to use a php variable in a <a href>link</a> tag? For example can I use <a href="http://www.somedomain.com/dir<?php$Enviroment?>/junk"> as an affective link that Google will spider correctly? Or do I need to use a static link without the php variable?
3 - What are your thoughts on the rankings a search engine gives to a file with a php extension compared to files with a html extension? I am referring to static php files -- not a page created on the fly.
Most of those questions can be answered by telling you this:
PHP is a server-side scripting environment. The browser, the user (and that includes search engines) will never see one line of your php code.
Whatever your PHP code outputs to the browser will be seen though.
The only thing to avoid is urls like: mysite.com/?id=34&nw=tytyty
because currently only INK and Google will index those pages.
There is no difference in .php or .html as far as I'm aware with regard to ranking.
Hope that helps!
2) Yes, you can place PHP tags anywhere. <? echo $I; ?>
3) Search engines do not care what extension you use. For that matter PHP doesn't care what extension you use either. You may tell PHP to parse HTML files as well.
Not to be too picky, but you can't tell PHP to parse HTML - you tell Apache or whatever server you use to send files ending with .html (or whatever) to the PHP parser. These configurations are set in httpd.conf (in Apache) and not in php.ini.
So you DID mean to be picky.
Okay, mea culpa, mea culpa, mea maxima culpa....
A DOC file is something.doc So when I say HTML files I mean something.HTML, I did not say HTML formatted files.
That wasn't my point at all. What I was trying to say is that if the original poster was trying to set this up, he would tell his APACHE not PHP to parse the file as PHP. I was trying to avoid confusion (talk about ironic :) ) by pointing out that he would have to modify httpd.conf (i.e. tell Apache) and not php.ini (i.e. tell PHP).
Oh well.... I'm on vacation for two weeks with computer access, so you won't have me to kick around... ou wait that was Nixon... I mean, you won't have me to put up with for while (sorry to foreigners and those too young to remember the reference).