<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof">I have a situation where I have .map files in two different directories, one called stage and one called prod.  If there were a .map in each directory called foo.map, I would like to be able to reference it by making my query parameter
 map=/foo.map and setting the directory in configuration, rather than being forced to use map=/stage/foo.map or map=/prod/foo.map as the case may be.  Is this possible with some mapserver config?  I found this StackExchange article
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a id="LPlnk191888" href="https://gis.stackexchange.com/questions/315039/mapserver-data-root">https://gis.stackexchange.com/questions/315039/mapserver-data-root</a> </span></div>
<div style="width: 100%; display: inline-block;" class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1">
<div style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;" class="LPBorder731330" id="LPBorder_GTaHR0cHM6Ly9naXMuc3RhY2tleGNoYW5nZS5jb20vcXVlc3Rpb25zLzMxNTAzOS9tYXBzZXJ2ZXItZGF0YS1yb290">
<table style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;" role="presentation" id="LPContainer731330">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td>
<div style="position: relative; margin-right: 12px; height: 160px; overflow: hidden;" id="LPImageContainer731330">
<a href="https://gis.stackexchange.com/questions/315039/mapserver-data-root" id="LPImageAnchor731330" target="_blank"><img width="160" style="display: block;" height="160" alt="" id="LPThumbnailImageId731330" src="https://cdn.sstatic.net/Sites/gis/Img/apple-touch-icon@2.png?v=54e3ab1edcf3"></a></div>
</td>
<td style="width: 100%;">
<div style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;" id="LPTitle731330">
<a style="text-decoration: none; color: var(--themePrimary);" href="https://gis.stackexchange.com/questions/315039/mapserver-data-root" id="LPUrlAnchor731330" target="_blank">Mapserver data root - Geographic Information Systems Stack Exchange</a></div>
<div style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;" id="LPDescription731330">
There is no concept of a data root, for a mapserver installation, or for a mapserver service. You can use local references within any map file to include other map files</div>
<div style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;" id="LPMetadata731330">
gis.stackexchange.com</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Which shows how you could use ScriptAlias in the Apache config to create an alias for each .map file, but we have over a thousand of them.  </div>
</body>
</html>