Question
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/qgismapserv.fcgi?map=([A-Za-z0-9]+)$ cgi-bin/qgismapserv.fcgi?map=/home/qgis/project/$1 [NC, QSA]
[1] http://localhost/cgi-bin/qgis_mapserv.fcgi?MAP=/home/qgis/project/qgisdatapostgis.qgs
[4] http://localhost/cgi-bin/qgis_mapserv.fcgi?MAP=qgisdatapostgis.qgs