Skip to content

rewrite.conf file generated while using latest_version_segment feature is wrong

While using latest_version_segment feature with Antora 3.0.0, a rewrite.conf file is generated to be used with nginx. The first line is like this one:

location ^~ /company/current/ { rewrite ^/company/current/(.*)$ /company/1\.7/$1 redirect; }

But if I visit one URL with current, it redirects to /company/1\.7/, so the dot escaping is going to the URL. If changing the redirection to this one deleting the slash that escapes the dot:

location ^~ /company/current/ { rewrite ^/company/current/(.*)$ /company/1.7/$1 redirect; }

It works correctly.

Edited by Luis Miguel Garcia
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information