• Resolved THWright

    (@thw56)


    Hello,

    Thank you for your plugin! I’m sure you don’t hear it enough.

    In attempting to export redirect rules for Nginx, I am finding that the Rest API will generate redirects for Apache but not for Nginx. Nginx generation shows that it found 18 records but the output only produces the basic server block structure and none of the actual redirects. There is no change in WP CLI. After reading over the FAQs and docs, I am stumped.

    Any thoughts on why one would generate but not the other?

    Please let me know if I can provide additional information.

    • This topic was modified 4 years, 7 months ago by THWright.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley

    (@johnny5)

    How are you trying to export?

    Thread Starter THWright

    (@thw56)

    I have attempted both through the web UI and the CLI. In the site’s root dir, I have tried running the following with the below results.

    $ wp redirection export all nginx.conf --format=nginx

    Success: Exported 18 to nginx

    $ cat nginx.conf

    # Created by Redirection
    # Mon, 06 Apr 2020 18:10:33 +0000
    # Redirection 4.7.1 – https://redirection.me

    server {
    }

    # End of Redirection

    In the web UI, I have tried running the exporter (options: everything, nginx rewrites) and I receive the following output, both visiting the link directly and in the output window.

    Nginx Access Log URI:
    /wp-json/redirection/v1/export/all/nginx/?_wpnonce=47a7563dcd

    data “# Created by Redirection\n# Mon, 06 Apr 2020 18:13:14 +0000\n# Redirection 4.7.1 – https://redirection.me\n\nserver {\n}\n\n# End of Redirection\n”
    total 18

    /wp-json/redirection/v1/export/all/apache/?_wpnonce=47a7563dcd

    # Created by Redirection
    # Mon, 06 Apr 2020 18:16:17 +0000
    # Redirection 4.7.1 – https://redirection.me

    <IfModule mod_rewrite.c>
    RewriteCond %{HTTP_HOST} ^https\://domain\.com$ [NC]

    (It would take a bit to sanitize the above. I have shortened it instead)

    Plugin Author John Godley

    (@johnny5)

    I’ve not been able to reproduce this problem, either with WP CLI or through the plugin. What kind of redirects do you have? Some of them are not supported by Nginx

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Nginx redirects won’t generate’ is closed to new replies.