<div dir="ltr">Hi developers,<br><br>I have hit my head on a wall, trying to hide the path of the file .qgs available in MAP Key.<div><br></div><div>My first attempt was to redirect the URL (QUERY_STRING) according to the <a href="https://www.mapserver.org/ogc/wms_server.html">link</a> :</div><div><br></div><div><pre style="line-height:1.2em;overflow:auto hidden;clear:both;padding:10px;border:1px solid rgb(198,201,203);font-size:1.2em;margin-top:0px;margin-bottom:0px">RewriteEngine on
RewriteRule wmsmap?(.*) /cgi-bin/mapserv?map=/home/www/mapserverstuff/mymapfile.map&$1</pre><div><br></div><div>Everything works fine if the whole URL is written in <b>Substitution</b> part<br></div><div><pre style="line-height:1.2em;overflow:auto hidden;clear:both;padding:10px;border:1px solid rgb(198,201,203);font-size:1.2em;margin-top:0px;margin-bottom:0px">RewriteEngine on
RewriteRule qgis-server?(.*) /cgi-bin/qgis_mapserv.fcgi?map=/home/qgis/project/map.qgs&version=1.3.0&service=WMS&request=GetCapabilities&$1<br></pre></div><div><br></div><div>However, if I just add the MAP Key value in the query, I got the error [1] bellow, even setting the insensitive flag [NC]:</div></div><div><br></div><div><pre style="line-height:1.2em;overflow:auto hidden;clear:both;padding:10px;border:1px solid rgb(198,201,203);font-size:1.2em;margin-top:0px;margin-bottom:0px">RewriteEngine on
RewriteRule qgis-server?(.*) /cgi-bin/qgis_mapserv.fcgi?map=/home/qgis/project/map.qgs.map&$1</pre></div><div><br></div><div>[1]</div><div><br></div><div>localhost/qgis-server?</div><div><br></div><div><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span class="gmail-html-tag"><ServiceExceptionReport<span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">xmlns</span>="<span class="gmail-html-attribute-value"><a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a></span>"</span><span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">version</span>="<span class="gmail-html-attribute-value">1.3.0</span>"</span>></span></div><div class="gmail-opened" style="margin-left:1em;color:rgb(0,0,0);font-family:monospace;font-size:13px"><div class="gmail-line"><span class="gmail-html-tag"><ServiceException<span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">code</span>="<span class="gmail-html-attribute-value">Service configuration error</span>"</span>></span>Service unknown or unsupported. Current supported services (case-sensitive): WMS WFS WCS WMTS SampleService, or use a WFS3 (OGC API Features) endpoint<span class="gmail-html-tag"></ServiceException></span></div></div><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span class="gmail-html-tag"></ServiceExceptionReport></span></div></div><div><br></div><div>In order to start using the RewriteCond <span style="color:rgb(51,51,51)">%{QUERY_STRING} MAP=/home/qgis/project/map.qgs, I need to get this (case-sensitive) first. Refer to [1].</span></div><div><span style="color:rgb(51,51,51)"><br></span></div><div><span style="color:rgb(51,51,51)">Any help in this matter will be very appreciated.</span></div><div><span style="color:rgb(51,51,51)"><br></span></div><div><span style="color:rgb(51,51,51)">Kind regards</span></div><div><span style="color:rgb(51,51,51)"><br></span></div><div><span style="color:rgb(51,51,51)">Julierme</span></div><div><span style="color:rgb(51,51,51)"><br></span></div><div><span style="color:rgb(51,51,51)"><br></span></div><div><br></div><div><br></div></div>