Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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 1148 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.

 

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

The first screenshot will be displayed as a thumbnail.

E.R. Fleming (20 views)
2014-07-29 03:07:13

E.R. Fleming (8 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (50 views)
2014-07-17 23:47:54

danieldean (42 views)
2014-07-17 23:41:23

MustardPeter (45 views)
2014-07-16 23:30:00
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!