• Resolved edmin

    (@edmin)


    I originally posted this in the issue queue on the github repo, but realised that this may be a better place for it. Apologies for the duplication.
    ———–

    I run a subdomain WP multisite installation with domain mapping. The admin areas are all at things like client-site-1.parentsite.com, client-site-2.parentsite.com etc. but the actual sites are domain mapped to client-site-1.com, client-site-2.com etc.

    When adding a file to a new download the path is listed as something like:
    http://client-site-1.parentsite.com/wp-content/uploads/sites/11/dlm_uploads/2016/01/file.docx

    After saving the domain is replaced with a token %%site_url_token%%
    %%site_url_token%%/wp-content/uploads/sites/11/dlm_uploads/2016/01/file.docx

    My issue is that when a shortcode is added to a page, and clicked on I get a 400 error with the browser trying access the file at:
    http://client-site-1.com/download/file-docx/%%site_url_token%%/wp-content/uploads/sites/11/dlm_uploads/2016/01/file.docx

    Any ideas why that may be happening? Ideally I suppose I would just strip the domain out entirely and use relative paths.

    Thanks!

    EDIT: I should probably note that I am using nginx with easyengine, just incase this is related to an .htaccess not being read

    https://wordpress.org/plugins/download-monitor/

Viewing 1 replies (of 1 total)
  • Thread Starter edmin

    (@edmin)

    I have since figured out what was causing this – it is an incompatibility with a plugin called ‘WordPress iHostname Migration’ which is what was replacing the hostname with %%site_url_token%% and failing to set it back again. Once disabled, everything works fine!

Viewing 1 replies (of 1 total)

The topic ‘%%site_url_token%% not being replaced’ is closed to new replies.