We have some users with a legacy client that does not use the "version" parameter in the GetCapabilities request. However they cannot handle WMS 1.3.0 (and the CRS parameter) yet, which our installation defaults to. Hence, in a transition phase I would like to default to WMS 1.1.1 - if possible for a single map service, otherwise for the whole installation.

Is there a setting in the mapfile or mapserver configuration to achieve this?

  • You could also create a static response document using the 1.1.1 response, then point them to that document. The GetCapabilities URL would be a self reference to the document, and the other request URLs would point to the actual server.
    – nmtoken
    Commented Nov 8, 2021 at 13:39

3 Answers 3


I don't think you can force Mapserver to default to a lower WMS version if not VERSION parameter is provided, but maybe somebody in the mailing lists can confirm it. The WMS standard is pretty clear on these situations:

6.1.4 Version Number Negotiation


If no version number is specified in the request, the server shall respond with the highest version it understands and label the response accordingly.

One possible solution is to use a rewrite engine, like mod_rewrite on Apache to attach the version you like if the VERSION parameter is missing.

  • Yes, I have considered mod_rewrite if there is no other option.
    – relet
    Commented Aug 18, 2010 at 9:33
  • 1
    I am pretty sure that there isn't a mapfile configuration that accomplishes this. I think that the best way to do this would be to either write a wrapper script that intercepts the requests and adjusts the args or use mod_rewrite.
    – DavidF
    Commented Aug 18, 2010 at 13:36

Your only other option is to encourage your users to find a client that respects the specification. Try explaining that their current client is not a WMS client. Naming and shaming the client might also work. If the developers are made aware of the problem it is a pretty easy fix for the client.

  • That's been done already. ;) I just prefer us to be a nice service provider and allow them a grace period to fix their side of the business.
    – relet
    Commented Aug 18, 2010 at 17:41
  • but by providing the fix at the server end you give them no incentive to fix their client and conform to the standard.
    – Ian Turton
    Commented Aug 18, 2010 at 18:37
  • Not if the length of the grace period is well-defined.
    – relet
    Commented Aug 19, 2010 at 7:19

You can force MapServer to default to a particular WMS version.

In the MAP > WEB > METADATA block you use the wms_getcapabilities_version instruction:

Default version to use for GetCapabilities requests that do not have a version parameter. If not set, the latest supported version will be returned.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.