Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: nginx rewrite rules for wordpress installation in subfolder

Discussion in 'Misc WordPress Requests' started by WordPress.org Forums », Apr 8, 2018.

  1. WordPress.org Forums »

    Guest

    Reply To: nginx rewrite rules for wordpress installation in subfolder, by

    Wow.

    I already checked the wiki AND google search before coming here. The examples are always for installations of wordpress that are in the root directory. The example WP rewrite rules are in the default location / block. This will not work if my wordpress installation is in a subfolder as explained in the original posts.


    location / {
    # This is cool because no php is touched for static content.
    # include the "?$args" part so non-default permalinks doesn't break when using query string
    try_files $uri $uri/ /index.php?$args;
    }


    This is the rule suggested in the wiki you linked.
    But this rule would rewrite https://www.example.com/index.php which is NOT a wordpress blog.
    My blog is located at https://www.example.com/blog/index.php

    Now obviously I did try to edit the rule.


    location /blog {
    try_files $uri $uri/ /blog/index.php?$args;
    }


    But it will not work with pages like https://www.example.com/blog/faq/

    You guys are just assuming that every wordpress users are familiar with nginx rewrite rules or what? You are treating me like I was asking a noobish question that can be googled in a few seconds, but this is an advanced issue. I spent considerable time googling for this issue and reading the wiki before coming here… only to get answered useless links to generic documentation. Unbelievable. Most search results from google are purple because I already read it. http://prntscr.com/j2lgh6

    Everything I read says that a lot of people aren’t familiar with nginx rewrite rules just like me. I’m familiar with .htaccess stuff but not nginx. Yet you guys act like every humans in the world should be familiar with nginx rewrite, and if we dare to ask a question we’re just lazy noobs who couldn’t google or read the wiki… yeah right.

    I thought a support forum would provide more help for those who can’t find the solution through the documentation, but I wonder what is the use of this forum if you are just going to forward me to google search.

    I hope I can get real support this time, and not condescending replies with generic documentation not related to my specific issue.

    edit: Please explain why my posts are now moderated just because I asked a question. I didn’t break the forum rules.

    Reply To: nginx rewrite rules for wordpress installation in subfolder
     
    #1

Share This Page

Monarch Social Sharing Plugin