Forum Moderators: open

Message Too Old, No Replies

include php files?

will i get indexed

         

davejs

10:36 am on Jul 15, 2003 (gmt 0)

10+ Year Member



Hi

If i have a PHP page that has a "include'somephp.php'" at the top will google pick up the full content returned to the browser from the code running within the include?

I just want to check that content from an include is valid!

Thanks

Brett_Tabke

4:37 pm on Jul 15, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



What you see in your browser when you view source is what the spider sees.

le_gber

8:40 pm on Jul 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As Brett said, your server side includes (whether PHP, ASP, text files, .inc files ...) are parsed by the server and rendered to the browser as normal html code (you can check your pages source code) therefore the spiders will see it.

Leo

davejs

9:38 am on Jul 16, 2003 (gmt 0)

10+ Year Member



Thanks for your help,

one other related question.....

I havnt done this yet but im thinking about it.....

I want to make a selection of "stored off" pages as .htm files with the majority of content being made via PHP.

Can i use a image src command to call a PHP file that returns an image but also returns loads of other content as well?

Is this legal in the eyes of a search engine? Im not trying to hide anything i just want my static pages as .htm rather than PHP.

Thanks again
Dave

davejs

10:26 am on Jul 16, 2003 (gmt 0)

10+ Year Member



Sorry the above isnt possible anyway is it!?

Any suggestions for how i can have HTM files calling php code?

waldemar

11:07 am on Jul 16, 2003 (gmt 0)

10+ Year Member



Can i use a image src command to call a PHP file that returns an image but also returns loads of other content as well?

Ehhhhmmmm (puzzled).. no?!

What you are looking for is (in case of an apache server) the mod_rewrite command that will simply be added to the .htaccess file. There's miilions of ressources out there - here at WW and google, but just to give you a quick starter:

With mod_rewrite you type in "anything your want" (for example mypage.html) in the browser's address field and this module looks up a completely different page (like myconstructedpage.php?var1=blablabla). You can do this file by file or with patterns.