Apache .htaccess RewriteRule QGIS-Server

According to URL [1], I would like to hind the file path value in the map variable using apache .htaccess RewriteRule. Based on discussions [2] and [3], I want to keep the same URL as in [1], but hind the file path as in [4]. My first attempt is:

RewriteEngine On RewriteRule ^cgi-bin/qgis_mapserv.fcgi?map=([A-Za-z0-9]+)$ cgi-bin/qgis_mapserv.fcgi?map=/home/qgis/project/$1 [NC, QSA]

[1] http://localhost/cgi-bin/qgis_mapserv.fcgi?MAP=/home/qgis/project/qgisdatapostgis.qgs

[2] link [3] link

[4] http://localhost/cgi-bin/qgis_mapserv.fcgi?MAP=qgisdatapostgis.qgs


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!