Viewing 15 replies - 16 through 30 (of 30 total)
  • Thread Starter extremecarver

    (@extremecarver)

    yes – correct.

    I found a temporary very unclean solution though – but I think it will cause more problems?

    ln -s /srv/www/velomap /srv/www/velomap/de

    (so I create a /de symbolic link directly on the server inside the website root directory. This then redirects to root).

    ??? Will a symbolic link /de/ back to / havoc qtranslate-x???
    If I create that symbolic link for each language, then the downloads will work (just did that). But I would guess qtranslate-x will choke on it at some point?

    Here is the redirect for that case:
    https://www.velomap.org/?s2member_file_download=odbl/velofinland_macosx.7z
    302: Temporary redirect to https://www.velomap.org/de/?s2member_file_download=odbl/velofinland_macosx.7z
    https://www.velomap.org/de/?s2member_file_download=odbl/velofinland_macosx.7z
    302: Temporary redirect to https://www.velomap.org/de/support/membership/?_s2member_vars=file..level..1..file..odbl%2Fvelofinland_macosx.7z..L2RlLz9zMm1lbWJlcl9maWxlX2Rvd25sb2FkPW9kYmwvdmVsb2ZpbmxhbmRfbWFjb3N4Ljd6&_s2member_sig=1427553659-2f8b8148e5c4e2b0ee899762baab9086
    https://www.velomap.org/de/support/membership/?_s2member_vars=file..level..1..file..odbl%2Fvelofinland_macosx.7z..L2RlLz9zMm1lbWJlcl9maWxlX2Rvd25sb2FkPW9kYmwvdmVsb2ZpbmxhbmRfbWFjb3N4Ljd6&_s2member_sig=1427553659-2f8b8148e5c4e2b0ee899762baab9086
    302: Temporary redirect to https://www.velomap.org/de/support/membership/
    https://www.velomap.org/de/support/membership/
    200: HTTP/1.1 200 OK

    Thread Starter extremecarver

    (@extremecarver)

    So far I cannot find any problems with the symbolic link for each language (except that it doesn’t fix the bug, but simply circumvents it by adding an extra redirect).

    (and still it’s the same link – I just trick the system now, the bug is not solved. But if you try out what happens now on my website it works).

    Plugin Author Gunu

    (@grafcom)

    and in your location /test3 it works as it should be the same as in my test site?

    Thread Starter extremecarver

    (@extremecarver)

    yes – strangely on the /test3 works correctly same as your test site.
    (I have a second main site – openmtbmap.org where if I activate qtranslate-x I have the same problem, also for that site I got a subdirectory test site – and that one also works correctly while the non subdomain main site does not work). I think I can live with the symbolic link workaround – but well that is really anything but clean…

    Plugin Author Gunu

    (@grafcom)

    In my test site all languages must go to:

    503: Basic File Downloads are NOT enabled yet.

    and in the URL must be /en /nl or /de right?

    Then it is correct?

    you are logged out?

    I want to try something.

    Thread Starter extremecarver

    (@extremecarver)

    yes – that is correct because I did not set up the s2member basic stuff. But it is enough for testing…

    If you ended up on the frontpage instead of ending up with 503 then there is a bug.

    If the URL should display /en /nl /de also for the 503 I’m not so sure. That is qtranslate-x territory. S2member itself specifies that links should be domain.com/?s2member_file_download=filename.zip (for a .zip file). And I guess the same would be true with any other plugin that first needs to examine a link. Essentially qtranslate-x should only touch links to pages/posts/categories that it can translate – if not it should forward the link without /XX/ language code.

    So if domain.com/de/?s2member_file_download=filename.zip
    also works – that would mean that qtranslate-x identifies that a .zip file is not translatable – therefore cuts out the /de/ and forwards the link without /de/ to wordpress… This actually introduces another step that is not really needed (because qtranslate-x does not have to deal with .zip in first place – but I guess such a redirect could only happen on .htaccess or nginx.conf server level – hence it’s okay if qtranslate-x takes the link and redirects it to the next wordpress filters).

    Thread Starter extremecarver

    (@extremecarver)

    Here is the redirect log for /test3
    (so in this case the not correct redirect to /de/ also happens – but somehow here s2member/wordpress can cope with it correctly).

    https://www.velomap.org/?s2member_file_download=odbl/velofinland_macosx.7z
    302: Temporary redirect to https://www.velomap.org/de/?s2member_file_download=odbl/velofinland_macosx.7z
    https://www.velomap.org/de/?s2member_file_download=odbl/velofinland_macosx.7z
    302: Temporary redirect to https://www.velomap.org/de/support/membership/?_s2member_vars=file..level..1..file..odbl%2Fvelofinland_macosx.7z..L2RlLz9zMm1lbWJlcl9maWxlX2Rvd25sb2FkPW9kYmwvdmVsb2ZpbmxhbmRfbWFjb3N4Ljd6&_s2member_sig=1427557694-5e8dc1769478b42731f862b8cce1e788
    https://www.velomap.org/de/support/membership/?_s2member_vars=file..level..1..file..odbl%2Fvelofinland_macosx.7z..L2RlLz9zMm1lbWJlcl9maWxlX2Rvd25sb2FkPW9kYmwvdmVsb2ZpbmxhbmRfbWFjb3N4Ljd6&_s2member_sig=1427557694-5e8dc1769478b42731f862b8cce1e788
    302: Temporary redirect to https://www.velomap.org/de/support/membership/
    https://www.velomap.org/de/support/membership/
    200: HTTP/1.1 200 OK

    Thread Starter extremecarver

    (@extremecarver)

    BTW – the redirect log for qtranslate/mqtranslate was the following (just copied from different domain – but that should not matter):
    – so here clearly I end up on the wrong language checkout options page – but did not get thrown onto the main frontpage. I guess this is due to no cookie, and my browser set to english…

    https://openmtbmap.org/?s2member_file_download=odbl/mtbcroatia_macosx.7z
    302: Temporary redirect to https://openmtbmap.org/support/members/?_s2member_vars=file..level..1..file..odbl%2Fmtbcroatia_macosx.7z..Lz9zMm1lbWJlcl9maWxlX2Rvd25sb2FkPW9kYmwvbXRiY3JvYXRpYV9tYWNvc3guN3o%3D&_s2member_sig=1427557864-3cab936356e4c2ea93584e78ae2c091f
    https://openmtbmap.org/support/members/?_s2member_vars=file..level..1..file..odbl%2Fmtbcroatia_macosx.7z..Lz9zMm1lbWJlcl9maWxlX2Rvd25sb2FkPW9kYmwvbXRiY3JvYXRpYV9tYWNvc3guN3o%3D&_s2member_sig=1427557864-3cab936356e4c2ea93584e78ae2c091f
    200: HTTP/1.1 200 OK

    Plugin Author Gunu

    (@grafcom)

    it works as you want?

    I get a little lost 🙂

    Thread Starter extremecarver

    (@extremecarver)

    Comment #25 is mqtranslate. Note that mqtranslate had no 302 to /de/.
    It did end up on a different language though. So not everything was perfect either. (as for qtranslate-x – it only works if I create the symlinks whis is a dirty workaround though I have no clue why I need this workaround on my main sites, but not my subdomains)

    Plugin Author Gunu

    (@grafcom)

    @extremecarver,

    how is it with this?

    This topic can be marked as solved?

    Thread Starter extremecarver

    (@extremecarver)

    Well I’m not sure – for me it is okay using symlinks. I would not think it is solved – but there are workarounds.

    The real solution would be that for any files/images qtranslate-x does not use /de or similar. It just seems that in some cases after the 302 qtranslate-x does manage to have those links handled correctly – even though the 302 is unnecessary. So treat non absolute links – or links with further logic like ?… the same as absolute links.

    Even though I don’t think too many people will be affected – until the links are not 302ed maybe a short section in the FAQs would help.

    e.g. “If qtranslate-x redirects links to translated not available resources (/XX for language – e.g. /en or /de) – you can create symlinks in your root wordpress installation folder to correct this (.i.e. a symlink placed in root folder named “de” or “en” that points back to the root folder itself). The linux command for a website placed in srv/www/website would be ln -s /srv/www/website /srv/www/website/en – you need to do this for each additional language.”

    This user has more or less the same problem:
    https://wordpress.org/support/topic/option-to-exclude-links-from-url-conversion?replies=9

    Plugin Author Gunu

    (@grafcom)

    velomap.org/?s2member_file_download=odbl/velocongo-democratic-republic_macosx.7z

    Goes to velomap.org/support/membership/ = correct

    velomap.org/de/?s2member_file_download=odbl/velocongo-democratic-republic_macosx.7z

    Goes to velomap.org/de/support/membership/ = also correct

    You did this with a workaround as described?

    I guess we’ll have to close this topic and it will be continued here

    Thread Starter extremecarver

    (@extremecarver)

    yes – I now use my workaround as described…

    Hi, I am having a similar problem (I think).
    I have a website http://www.something.com/ and when i trasnlate to spanish it become http://www.something.com/ es.
    On the menu i have a button eith an external link like http://www.something.com/something/ but it gives page not found because wordpress assumes http://www.something.com/es/something

    How can I change this?

    Regards

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Disable automatic link rewriting for downloads not working’ is closed to new replies.