Basically what I do is copy and rename mapserv.exe to some name I want in the URL. Then, if a request goes to that file, set the MS_MAPFILE variable to the relevant map file. This has worked well for me so far.<br><br>For example, my organization recently published our 15th geologic map of out state. I want people to refer to it as geomap15. Therefore, I copied and renamed mapserv.exe to geomap15 (no exe extension, file still in cgi-bin directory). Then, I have the following in my httpd.conf file: <br>
<br>SetEnvIf Request_URI "/cgi-bin/geomap15" MS_MAPFILE=C:/pathtomapfile/geomap15.map<br><br>My URLs then look something like: <a href="http://maps.dgs.udel.edu/cgi-bin/geomap15">http://maps.dgs.udel.edu/cgi-bin/geomap15</a>?<br>
<br>(This map file in action here: <a href="http://www.dgs.udel.edu/datasets/dgs-geologic-map-no-15-georgetown-quadrangle-dataset">http://www.dgs.udel.edu/datasets/dgs-geologic-map-no-15-georgetown-quadrangle-dataset</a>)<br>
<br>- John<br><br clear="all">**************************************************<br>John Callahan, Research Scientist<br>Delaware Geological Survey, University of Delaware<br>URL: <a href="http://www.dgs.udel.edu" target="_blank">http://www.dgs.udel.edu</a><br>
**************************************************<br>
<br><br><div class="gmail_quote">On Wed, Nov 3, 2010 at 8:41 PM, Richard Greenwood <span dir="ltr"><<a href="mailto:richard.greenwood@gmail.com">richard.greenwood@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Wed, Nov 3, 2010 at 2:42 PM, David Hildebrand<br>
<<a href="mailto:David.Hildebrand@afsc.ca">David.Hildebrand@afsc.ca</a>> wrote:<br>
> Is there a way of abbreviating pathnames to the map file? For instance, my<br>
> URL to produce a map is<br>
><br>
><br>
><br>
> <a href="http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/MapServer/sample.map&mode=map" target="_blank">http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/MapServer/sample.map&mode=map</a><br>
><br>
><br>
><br>
> In my apache configuration file I have<br>
> //fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased to<br>
> /test/ but the alias does not seem to work with CGI. I’m just wondering if<br>
> there is a workaround so that I don’t need to specify the whole file path in<br>
> my URL.<br>
><br>
><br>
><br>
> Thanks.<br>
><br>
> ===========================<br>
> David V. Hildebrand<br>
> Agriculture Financial Services Corporation<br>
> (403) 782-8239<br>
<br>
</div>In your Apache httpd.conf add:<br>
SetEnv MY_MAP "C:/path/to/my/mapfile.map"<br>
<br>
and then your URL can be:<br>
<a href="http://localhost/cgi-bin/mapserv.exe?map=MYMAP&mode=map" target="_blank">http://localhost/cgi-bin/mapserv.exe?map=MYMAP&mode=map</a><br>
<br>
Shorter URL, better security.<br>
<br>
Rich<br>
<font color="#888888"><br>
--<br>
Richard Greenwood<br>
<a href="mailto:richard.greenwood@gmail.com">richard.greenwood@gmail.com</a><br>
<a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br>