[mapserver-users] Rewrite rule problem

gorank kirandziskig at gmail.com
Mon Oct 30 08:23:59 PDT 2017


Hi Andreas,

As you sugested I have added in* httpd.conf* file following

<Location "/cgi-bin/GDZ/wms"> 
  SetEnvIfExpr "%{QUERY_STRING} =~ /^(.*&)?map=([[:alnum:]]+.map)(&.*)?$/"
MS_MAPFILE=C:/ms4w/apps/Demo/$2 
</Location> 

 RewriteRule /cgi-bin/Demo/wms /cgi-bin/Demo/wms?MAP=MS_MAPFILE [PT,QSA]

and when I put URL
http://localhost:81/cgi-bin/Demo/wms?map=N1.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0

I receive the following message:
msLoadMap(): Unable to access file. (N1.map)

As addition in the C:/ms4w/httpd.d folder I have file httpd_Demo.conf file
with following content

Alias /Demo/ "/ms4w/apps/Demo/"
<Directory "/ms4w/apps/Demo/">
  AllowOverride None
  Options Indexes FollowSymLinks Multiviews
  Order allow,deny
  Allow from all
</Directory>

What I'm doing wrong.

Best regards,
Goran



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html


More information about the mapserver-users mailing list