0 votes
133 views
by

Hi there,

I have installed WordPress in the Subdirectory. 

Earlier postname permalink was not working to fix it, I added # Making postname working code.

# WPFC NGINX CONFIGURATION

# DO NOT MODIFY, ALL CHANGES LOST AFTER UPDATE Webinoly

set $skip_cache 0;

# POST requests and URL with a query string should always go to php

if ($request_method = POST) {

        set $skip_cache 1;

}

if ($query_string != "") {

        set $skip_cache 1;

}

# Don't cache URL containing the following segments

if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|.*sitemap.*\.xml)") {

        set $skip_cache 1;

}

# Don't use the cache for logged in users or recent commenter or customer with items in cart

if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|[a-z0-9]+_items_in_cart|[a-z0-9]+_cart_hash") {

        set $skip_cache 1;

}

# Making postname working

location /hi {

                index   index.html index.htm index.php;

                root /var/www/example.com/htdocs/hi;

                try_files $uri $uri/ /hi/index.php?$args;

        }

# Use cached or actual file if they exists, Otherwise pass request to WordPress

location / {

        try_files $uri $uri/ /index.php?$args;

}

# Custom code end here

location ~ \.php$ {

        try_files $uri =404;

        include fastcgi_params;

        fastcgi_pass php;

        fastcgi_cache_bypass $skip_cache;

        fastcgi_no_cache $skip_cache;

        fastcgi_cache WORDPRESS;

}

Now, the problem is example.com/hi/wp-admin/ is showing redirect loop.

Where example.com/wp-admin/ is working as usual. That's great!

 I have no idea how to fix it for the subdirectory.

Can you help me in fixing the issue?

I want paid support. Please let me know how I can contact you.

Thanks & Regards,

Leo

by Expert
This feature is now available in Webinoly v1.9.0.
by Rookie

Thank you so much for the update!!! laugh

1 Answer

0 votes
by Expert

Hi Lee,

Your request for Premium Support is really appreciated, I just sent you an email with the details.

Regards.

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

If you have a question about Webinoly, please ask in English or Spanish.

To report a bug, please ask a question here with the bug tag.

Donations

Webinoly Support Paypal Donations Webinoly Support Bitcoin Donations

Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.

Affiliate Links

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...