<div dir="ltr"><div dir="ltr">You might try [QSA] Query String Append <a href="https://cwiki.apache.org/confluence/display/HTTPD/RewriteFlags+QSA">https://cwiki.apache.org/confluence/display/HTTPD/RewriteFlags+QSA</a><div>Something like:</div><div>    RewriteRule Sentinel2Ukraine /cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map  [QSA]<br></div><div>Or maybe:</div><div>    RewriteRule ^Sentinel2Ukraine$ /cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map  [QSA]<br></div><div><br></div><div>You could also put your map file in an Apache environment variable in your apache2.conf file like: </div></div>    SetEnv Sentinel2Ukraine /DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map<div>And then reference it like:</div><div>    map=Sentinel2Ukraine</div><div>If you do that then you can add a little security by setting another Apache env var:</div><div>    SetEnv MS_MAP_NO_PATH "foo"<br></div><div>as described here <a href="https://mapserver.org/environment_variables.html#environment-variables">https://mapserver.org/environment_variables.html#environment-variables</a></div><div><br></div><div>Hope that helps,</div><div>Rich<br><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 23, 2022 at 5:38 AM Marcin Niemyjski via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7680641495630632476">




<div dir="ltr">
Hello,
<div>I'm trying to shorten my mapfile url from <a href="https://www." target="_blank">https://www.</a>****.eu/cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map to </div>
<div><a href="https://www." target="_blank">https://www.</a>****.eu/Sentinel2Ukraine.</div>
<div><br>
</div>
<div>I'm doing it by writing</div>
<div>RewriteEngine onRewriteRule Sentinel2Ukraine?(.*) /cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map&$1</div>
<div>into apache2.conf but there is no result (I do restart apach after each edition of apache2.conf). QGIS while connecting to WMS returns "Download of capabilities failed: Error transferring <a href="https://www." target="_blank">https://www.</a>****.eu/Sentinel2Ukraine?SERVICE=WMS&REQUEST=GetCapabilities
 - server replied: Not Found"</div>
<div><br>
</div>
<div>What am I doing wrong?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Best,</div>
Marcin
</div>

_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard W. Greenwood<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div></div></div></div>