Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Webstart PHP's picked up by google bot.  (Read 908 times)
0 Members and 1 Guest are viewing this topic.
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Posted 2004-08-26 12:04:46 »

not only that, but they are listed first, before the index.html that is in the same location.

at least in my case they are.
http://www.google.com.au/search?q=JMTetris

someone following the first link might get a surprise if they have java, or think that the page is broken if they don't.

google has a suggestion to put this into the 'page':
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

the only alternative is to edit robots.txt, and i dont have permission. Is there a way to add meta tags to PHP or JNLP? every way i tried resulted in webstart complaining about it.
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #1 - Posted 2004-08-26 12:31:44 »

Ok... after a bit thinking...

Well, you can include that meta tag for bots only. That is... checking the agent via php and if it contains "bot", you add that meta tag and otherewise you just don't.

$agent=addslashes($_SERVER['HTTP_USER_AGENT']);

弾幕 ☆ @mahonnaiseblog
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #2 - Posted 2004-08-26 12:39:35 »

Huh

sorry, i'm no php programmer. i have no idea what that example means. (that's why i posted on this board)

1  
2  
3  
4  
5  
<?php header("Content-type: application/x-java-jnlp-file"); ?>
<jnlp spec="1.0+" codebase="http://www.adam.com.au/kellyjones/perm/" href="JMTetris.jnlp">
      <information>
            <title>JMTetris</title>
            <vendor>JuddMan!</vendor>


i thought having just nofollow on my index.html would work but now i think not, as google would consider php to be a web page and keep it as long as it still exists.

by the way, is (href="JMTetris.jnlp") correct, or should it be (href="JMTetris.php").
the JNLP is on the server next to the php
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #3 - Posted 2004-08-26 12:55:11 »

Something like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
<?php header("Content-type: application/x-java-jnlp-file");
$agent=addslashes($_SERVER['HTTP_USER_AGENT']);
if(stristr($agent,'bot'))
{
   echo '<HTML><HEAD><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></HEAD><BODY></BODY></HTML>';
   die;
}
?>
paste your jnlp here


That should give all bots an empty page with that noindex/nofollow meta tag.

弾幕 ☆ @mahonnaiseblog
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #4 - Posted 2004-08-26 13:05:41 »

Oh I forgot... I would use href="JMTetris.php".

And check if you can use ".htaccess"... just create a plain text file with this stuff:
1  
AddType application/x-java-jnlp-file .jnlp


Save it as ".htaccess" and put it into the same directory on the server. If you can use php it's *very* likely that you can use htaccess.

弾幕 ☆ @mahonnaiseblog
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #5 - Posted 2004-08-26 17:02:17 »

no, i already tried .htaccess

i'd say my isp just allows PHP cause they use it for member services and the member pages are hosted on the same server they host their homepage on. they don't need .htaccess cause they can set content type directly. they would not be at all interested in enabling special features just so joe user can have a game run off their servers, so we have to work with what we've got.

thanks for the PHP script. Webstart accepts it, and time will tell if google has noticed.

-judd
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #6 - Posted 2004-08-26 17:46:20 »

I see. So you've indirectly paid for that webspace?

I would just send em a friendly mail and ask for it. It's a piece of cake to add and they are most likely interested in satisfied customers. Heck... even the free webspace I've used in the past had that mime type setup correctly (surprisingly Wink).

弾幕 ☆ @mahonnaiseblog
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #7 - Posted 2004-08-29 01:01:04 »

I accidently had another idea.

You can check the referer and if it contains "google" you redirect the visitor over to your index file. The benefit from this approach is that you won't have to wait until google sorted that file out of it's index.

However, some browsers allow you to disable the referer... however most people don't do that. So at least 80% of the visitors will end up at the correct page Wink

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
<?php
//***disable caching***
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");

//***check agent for 'bot'***
$agent=addslashes($_SERVER['HTTP_USER_AGENT']);
if(stristr($agent,'bot'))
{
   echo '<HTML><HEAD><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></HEAD><BODY></BODY></HTML>';
   die;
}

//***check referer for 'google'***
$ref=addslashes($_SERVER['HTTP_REFERER']);
if(stristr($ref,'google'))
{
   header("Location: http://www.adam.com.au/kellyjones/perm/");
   die;
}
header("Content-type: application/x-java-jnlp-file");

//***paste your jnlp below the closing tag***
?>


Caching should be disabled because you don't want to redirect people (again) who come from a "correct" page (everything else than google).

弾幕 ☆ @mahonnaiseblog
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (88 views)
2013-05-16 21:24:48

gouessej (117 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (125 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.175 seconds with 21 queries.