1
0
mirror of https://github.com/klokantech/tileserver-php.git synced 2025-08-06 14:47:21 +02:00

Problems with WMTS have been fixed.

This commit is contained in:
Dalibor Janák
2014-04-28 14:12:51 +02:00
parent 2461a184a8
commit 0f059f4fb7
3 changed files with 125 additions and 65 deletions

View File

@@ -17,7 +17,7 @@ RewriteEngine on
#some hostings require RewriteBase e.g. 1&1.com
#RewriteBase /
#RewriteBase /cosi/
#RewriteBase /server/
#some hostings require -MultiViews e.g. 1&1.com
#Options -MultiViews
@@ -27,15 +27,15 @@ RewriteEngine on
# The file can be accessed directly:
# Example: http://www.tileserver.com/grandcanyon/10/192/401.png
# map /wmts/layer/[ANYTHING]z/x/y.ext -> /layer/z/x/y.ext (WMTS ignoring tilematrixset,style,..)
# BTW This is used only by Gaia which ignores the <ResourceURL template="...">
RewriteRule ^wmts/([\w\d\._-]+)/.*?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$4/$3.$5 [N]
# Example: http://www.tileserver.com/wmts/grandcanyon/style/tilematrixset/10/192/401.png
# map /layer/[ANYTHING]z/x/y.ext -> /layer/z/x/y.ext (WMTS ignoring tilematrix,style,..)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([\w\d\._-]+)/.+?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$3/$4.$5 [N]
# Example: http://www.tileserver.com/grandcanyon/style/tilematrixset/10/192/401.png
## map /wmts/layer/[ANYTHING]z/x/y.ext -> /layer/z/x/y.ext (WMTS ignoring tilematrixset,style,..)
## BTW This is used only by Gaia which ignores the <ResourceURL template="...">
#RewriteRule ^wmts/([\w\d\._-]+)/.+?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$4/$3.$5 [N]
## Example: http://www.tileserver.com/wmts/grandcanyon/style/tilematrixset/10/192/401.png
#
## map /layer/[ANYTHING]z/x/y.ext -> /layer/z/x/y.ext (WMTS ignoring tilematrix,style,..)
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^([\w\d\._-]+)/.+?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$3/$4.$5 [N]
## Example: http://www.tileserver.com/grandcanyon/style/tilematrixset/10/192/401.png
# rewrite .jpeg -> .jpg
RewriteRule ^(.+).jpeg$ $1.jpg [L]