1

I am running an Nginx server with Wordpress installed on it. The Wordpress installation has an .htaccess file in its root.

Now I read that Nginx doesn't actually work with .htaccess files and using .htaccess with Nginx is wrong.

What file is then Nginx working with, where can I find this file and what should I do with my current .htaccess file as it has quite a bit of info there.

Is there some kind of converter that could convert my current .htaccess file to the one that Nginx would support?

2

Nginx doesn't support htaccess or any other directory level config file, every config rule are stored in nginx.conf file which you can found in conf directory. And every time you add new rule to this file you have to reload it by command nginx -s reload.

You can use this post provided by nginx official site to convert your .htaccess rule to nginx rules and there is also a tool for this you can find here.

  • Many thanks for the comment Abhishek. Do I only edit the file using SSH or can I FTP it? Is the "nginx.conf" file inside the "conf" directory within my Wordpress installation? – Joe Bloggs May 17 '17 at 4:19
  • sorry, just don't have an access to the FTP now, so I can't check if I have a folder called "conf" with this file at all .. – Joe Bloggs May 17 '17 at 4:19

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.