homepage Welcome to WebmasterWorld Guest from 23.22.179.210
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Marketing and Biz Dev / General Search Engine Marketing Issues
Forum Library, Charter, Moderators: mademetop

General Search Engine Marketing Issues Forum

    
PHP SELF querie (indexing?)
is it bad practice to use PHP_SELF to include content for SEO?
jerry95




msg:4394623
 3:41 am on Dec 6, 2011 (gmt 0)

Hello, I must say that I can't make up my mind about anything related to SEO, cause there are so many different opinions. But I would be very grateful if someone could help me with the problem I post:
I have a web page where all the navigation points to content that is included in the same html document using the server variable PHP_SELF. That means that the html document, and the title of the document, will remain the same. I use a switch instruction to decide wether to include one or another content.
Now I would like to ask ¿will my content still be indexed by search engines? I know Yahoo differs from Google, and there are probably many differences among search engines. But is it generally a bad practice to do so?
The way the web page is made calls PHP_SELF with different queries, and then includes diverse content based on a switch instruction. The thing is that I can't make up my mind about changing the code so that I use a template (home made, so to say) and use the template to reproduce the contents with the navigation still in place.

The images related to the content also change by means of the switch instruction, like so:
if (isset($_GET['pagina'])){switch ($_GET['pagina'])
{case "tesis":
echo "Imprimimos, encuadernamos y le damos el mejor acabado a tu Tesis";
$titulos[]="Tesis urgentes en menos de 4 horas";
$titulos[]="Tesis con pasta dura o blanda";
$titulos[]="Acabado profesional de tu tesis";
$titulos[]="";
$titulos[]="Encuadernaciones diversas tales como holandesa y mestiza";
$titulos[]="Cubiertas doradas, en serigrafía, grabadas o laminadas";
$titulos[]="Puedes elegir las cubiertas de tu tesis";
$titulos[]="Tesis urgentes con encuadernado térmico";
$titulos[]="Puedes elegir encuadernación con tela, keratol o piel";
break;
etc.
And using the following in the img tag:
<img src="images/<?php $imagen=isset($_GET['pagina'])?($_GET['pagina'])."1".'.jpg':'primera.jpg'; echo $imagen; ?>" alt="Multimagen" width="450" height="225" title="" rel="<h3><?php echo $titulos[0]; ?></h3>"/> for example.
And the links use the following structure:
<li class="kwick1"><a href="<?php echo $_SERVER['PHP_SELF'];?>?pagina=tesis">Tesis</a></li>


Then on the content div (where I want the different content to appear), it goes:

<?php
if (!isset($_GET['pagina']) || !$_GET['pagina']) {include_once('main.php');}else{
$paginas_permitidas=array('tesis', 'ploteo', 'impresion', 'varios', 'main', 'contacto', 'ubicacion');
if (isset($_GET['pagina']) && in_array($_GET['pagina'], $paginas_permitidas)) {
include_once($_GET['pagina'].'.php');
}}
?>


¿Am I definitevly off? ¿Does this mean that search engines will not index the content of the web page? I think it's better to include more than one page on the site, no doubt, but that leaves including dynamic content like this out. So can somebody give me a plain answer?

 

leadegroot




msg:4394673
 9:16 am on Dec 6, 2011 (gmt 0)

Google only sees the HTML output at the end - it doesn't matter how you generated it.
You may encounter problems if your algorithms show the same page for different urls, but the technique done properly doesn't came problems.

jerry95




msg:4395016
 2:40 am on Dec 7, 2011 (gmt 0)

Thanks leadergroot, what I am trying to do is a navigation that works like a frame but without the frames. I have a left navigation and all the content appears right and the images on top of the content. Like I said, this causes the url only to change after the query part, like www.multimagen.com.mx/principal.php?pagina=#*$!. I presume I'm doing it right cause I don't get any errors or notices from php, but I don't know how many search engines actually search after the "?", I've read there are many who stop indexing past that point, and some people recommend rewrinting the url to a static one, though Google specifically advises otherwise. I really think I should stop bothering but I've had other sites where SEO becomes a real problem and those problems become difficult to solve once your pages are indexed, (those sites were flash made, though);) What bothers me is to have only one document title for all the pages, but it would be even worse if search engines didn't look past the query and ignored the content. About this last issue, ¿should I stop worrying?
Thanks again.

enigma1




msg:4395195
 2:52 pm on Dec 7, 2011 (gmt 0)

I don't know how many search engines actually search after the "?"

All. They will treat the pages as different ones.

The meta-tags should follow a similar concept as you special case the content. Ideally you emit different meta-tags for the different pages.

Also there is a common mistake with the default parameters happens in many cases.
if (!isset($_GET['pagina']) || !$_GET['pagina'])

The "if" statement will become true for different urls. In fact for an endless number of urls. So if the parameter is not what you expect but it is set, you should perhaps do a 301 or 404 instead of displaying regular content, therefore validate the parameter much earlier before any output (as you are using it to point to an image and later on to include a php file, not good for security).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Marketing and Biz Dev / General Search Engine Marketing Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved