[Mapserver-users] Mapfile in WMS
Daniel Morissette
morissette at dmsolutions.ca
Thu Nov 6 07:49:55 PST 2003
nicolas.fortin at ec.gc.ca wrote:
> Hi!
>
> I just test some Mapfile for WMS and it works pretty fine but I wonder
> if I can avoid putting the path to the mapfile in the parameter.
> Ex:
> http://blablabla/cgi-bin/mapserv.exe?map=*tutorial366/s2/s2ex8.map*&REQUEST=GetCapabilities
> <blablabla/cgi-bin/mapserv.exe?map=tutorial366/s2/s2ex8.map&REQUEST=GetCapabilities>
> I want it like
> http://blablabla/cgi-bin/mapserv.exe?map=s2ex8.map&REQUEST=GetCapabilities
> <http://blablabla/cgi-bin/mapserv.exe?map=s2ex8.map&REQUEST=GetCapabilities>
>
> This way, I have to put the Mapfile at the root, right?? Or perhaps I
> missed something....?
>
If you pass a relative path in the map=...parameterd then the path
should be relative to the working directory of your CGI, I never tried
this, but this would likely mean relative to the cgi-bin directory.
If you use Apache then you can get rid of the map=... parameter
completely using the SetEnvIf directive, see the section "More About the
Online Resource URL" in the WMS Server HOWTO:
http://mapserver.gis.umn.edu/doc40/wms-server-howto.html#onlineresourceurl
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list