1

I have a Wordpress site with nginx webserver i have a certain requirement.

So Wordpress used to be main website, with a blog permalink which opens a page with all the blog list there,But now we have our main website in ruby and we setup the wordpress on same server as Ruby with nginx, To access blog you have to type abc.com/blog. and it working fine this way.

But now we want to open the blog permalink page to open when we enter abc.com/blog .

By this i mean if i hit abc.com/blog it should redirect to abc.com/blog/blog.

Below is my nginx config which works perfect for other situations.

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

Now i am adding a rule for redirection on permalink like below but it is not working.

location = /blog/ {
       try_files $uri $uri/ /blog/blog/ ;
  • Sorry, but your question is unclear. Please edit the question and include clearly the current problem and what you need it to do. Also, include the Nginx configuration 'properly formatted', the site address assigned to WordPress and the current Permalink format assigned in WordPress. – Simon Hayter Jul 27 '18 at 13:09
  • I have updated please check – amit singh Jul 27 '18 at 16:12
0

So, After alot of search, I found the solution and it was a very simple one. Just change you home page settings in wordpress and it was done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.