Thats what I do. In my experience its lighter weight than using a
custom handler (say php)
Use the rewrite engine to perform the redirect, rather than a
ErrorDocument, that has too much overhead.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /img/transparent_1x1.png [L]
It can. Needs the script to set the right caching headers.
At one time many proxies wouldnt cache a request with a ? in it. But
most now do, when they have the proper cache headers. The browser
cache doesnt care about the ?, it would cache it anyway.
>
> Any idea?
>
> Martin.
>
>
> On Jul 29, 5:43 am, John Coryat <cor...@gmail.com> wrote:
>> Martin's suggestion is the standard way of doing it. Make a tile server that
>> does this simple function and you'll notice your server runs faster.
>> Processing a 404 is time consuming.
>>
>> If you'd like to see a Perl example, seehttp://www.usnaviguide.com/ws-2008-02- look for download.zip
>>
>> -John Coryat
>
> --
> You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
> To post to this group, send email to google-map...@googlegroups.com.
> To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
$filename = "tiles/".intval($_GET['z'])."/".intval($_GET['x'])."/".intval($_GET['y']).".png";
header("Content-Type: image/png");
header("Cache-Control: max-age=84600");
if (file_exists($filename)) {
header("Content-Length: ".filesize($filename));
readfile($filename);
} else {
header("Content-Length: 95");
readfile("transparent1x1.png");
}
Change to suit your needs.
Sorry for the noob question but does this require any other
configuration changes (ie. htaccess)? I've included this in my
index.html and it is still showing 404 errors in Chrome.
Thanks