Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

pop_images.php is in google


Salvo

Recommended Posts

Posted

Hi all

 

I have noticed that some people come to my site throught the pop up image.php

 

 

I have tried and make it go all wrong sending the surfers away

 

My questions:

why the pop up had been taken by the search ..

and how to avoid that?

 

Thanks

 

 

Salvo

Posted

put the popup url in your robots.txt

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Posted

Hi Chris

 

I don't have a robots.txt

 

should I have one?

if it is a must have How do I go about having it and how should I include what I don't want to be picked up

 

Thanks

 

Salvo

Posted

search for tutorials about it the robo file is a file for search engine crawlers.

i it you can add pages the search engine shouldn't add or crwal...

Posted

I have found this :

Where do I find out how /robots.txt files work?

 

It is best explained with an example:

# /robots.txt file for http://webcrawler.com/

# mail [email protected] for constructive criticism

 

User-agent: webcrawler

Disallow:

 

User-agent: lycra

Disallow: /

 

User-agent: *

Disallow: /tmp

Disallow: /logs

 

 

I make it as a file robots.txt ?

 

Question 1: Where does it go? in root directory?

Question 2: To disallow all the pop up popup_image.php?pID=90

not just the product id 90 but all the popup_image.php how shell I place it?

 

My problem is google at moment, how do I do it?

 

Thanks

 

salvo

 

PS: I counld find it in Wiki

Posted

I might have the answer to my questions, but I like a confermation by someone

 

this is the robots.txt file I will place in ROOT direcotry

and it will all the spider will NOT search for the popup_image.php

 

 

# robots.txt file

# For domain: http://www.ll..

 

# All robots will spider the domain

#User-agent: *

#Disallow:

User-agent: *

Disallow: /admin/

Disallow: /popup_image.php

Posted
I have noticed that some people come to my site throught the pop up image.php

 

I have tried and make it go all wrong sending the surfers away

 

My questions:

why the pop up had been taken by the search ..

and how to avoid that?

In stead of preventing people to find your site through the popups, I would make a link in the poup back to the site/product (unless you have too many costumers already of course).

Posted

The pop up is the one used in the product_info.php CLICK TO ENLARGE

 

unfortunatelly google got hold of it and clicking on the link given by google, ONLY the pop up open the larger image only ... and close it

 

AT MOMENTS there are quite a few of these pop up listed already in google, I will have to make amend adding a link to the main site so I don't loose the surfer.

 

But in the future is not good searching for something, found a link to an image pop up that close on you

 

PS: By the way, is it correct what I have done for the robots.txt?

Posted

Reading this thread made me check my own "popup_image.php" - all of mine are also in Google.

 

I put together a quick couple of lines of .php, which you should place in popup_image.php:

 

if (ereg("google", strtolower($HTTP_REFERER))) {
     header("Location: " . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . "?products_id=" . $pID);
     exit;
 }

 

right after the following piece of code (in popup_image.php):

 

require('includes/application_top.php');

 

Fairly straightforward.

Posted

Yes, beautifull. perfect.

 

as soon as someone clicks on the pop up link listed by google, now is taken to the product itself....

 

Gary. Is it the best solution? EVEN better would be not to let google take the pop ups in the first place?

 

Salvo

Posted

Where do you put this code in the popup_image.php?

Posted
Where do you put this code in the popup_image.php?

Gary Said:

 

right after the following piece of code (in popup_image.php):

 

 

CODE

 

require('includes/application_top.php');

Put it here

Posted

Using the BTS, so most of you can't just copy and past this code, but maybe it still is usefull to someone somehow.

 

I created a link from the popup (popup_image.tpl.php when using the BTS) back to the product_info.php page (and there also is a close window link "invented" by someone else).

<?php
echo '<div id="imagePopup">';

if (isset($pID))
{ // link back to this products info page (target="_blank" because we don't want it inside the popup window)
 echo '<a target="_blank" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $pID) . '">'.$products[products_name].'</a>';
 echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']);
 echo '<a id="closePopup" href="javascript:window.close()">' . TEXT_CLOSE_WINDOW . '</a>';
}
else
{
 // a link to the index page if the products id is unknown somehow
 echo '<a target="_self" href="' . HTTP_SERVER . DIR_WS_HTTP_CATALOG . '"><h1>www.yourdomain or whatever you like</h1></a>';
}

echo '</div>';
?>

Posted
Yes, beautifull. perfect.

 

as soon as someone clicks on the pop up link listed by google, now is taken to the product itself....

 

Gary. Is it the best solution? EVEN better would be not to let google take the pop ups in the first place?

 

Salvo

I believe that once a page is in Google, you should do nothing to remove it. Buying customers may find your site from that Google listing...

 

So I would say that if your page is not in Google, then put popup_image.php into your robots.txt file.

 

If it is already in Google, then leave it as is, and add in the piece of code I made.

Posted

You could try to make the code a little more portable by doing this:

 

NOTE: UNTESTED so might not work!!!

 

if ((!eregi(HTTP_SERVER, $HTTP_REFERER))||(!eregi(HTTPS_SERVER, $HTTP_REFERER))) {
   header("Location: " . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . "?products_id=" . $pID);
   exit;
}

 

Saying: if the referring URL does not contain the HTTP_SERVER *or* the HTTPS_SERVER then redirect. Makes sense, but it is late so it might not work quite as intended.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...