[mapserver-users] relative path for .map file inside a WMS url

thomas bonfort thomas.bonfort at gmail.com
Wed Apr 20 08:59:12 PDT 2011


Actually, you can also do this with an apache rewrite rule, I've just
tested it and it seems to work quite well !

RewriteEngine On
RewriteRule ^/wms/(.*) /cgi-bin/mapserv?map=/datadir/$1.map [PT,QSA]

it will translate requests that are like /wms/carto to
/cgi-bin/mapserv?map=/datadir/carto.map , along with the  query
string.

regards,
thomas

On Wed, Apr 20, 2011 at 16:43, Clément MONIER
<Clement.MONIER at v-trafic.com> wrote:
> Hi,
>
>
>
> I have a CGI MapServer 5.6.0beta5 instance running on Windows.
>
> But I’m not (and won’t never be) able to know for sure the folder’s path
> where its files are deployed.
>
> I know that MapServer is running fine though, delivering maps as needed.
>
>
>
> But I’m not able to make some WMS web request because I can’t provide an
> absolute path for the “map=” parameter :
>
> I don’t know in which folder my .map files reside.
>
>
>
> http://myserver/cgi-bin/mapserv.exe?map=?*****?/mymapfile.map&...
>
>
>
> Is there a way to use relative path ? or to use a kind of environment
> variable MS_INSTALL_PATH inside the “&map=” parameter?
>
> I can only act on the server’s configuration and MS deployment
>
>
>
> Thanks for your help
>
>
>
> Clément
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



More information about the MapServer-users mailing list