How to enable mod_rewrite in nginx server running on Ubuntu OS

December 4, 2017 3.6k views
Nginx Ubuntu 16.04

I have deployed codeignitor code in the nginx server and I’m able to access the login page and after that if i try to login it is throwing error.

I came to know that I need to enable mod_rewrite in ngnix server.

Since I’m very new to this, can anyone help me what to do step by step.

2 Answers

mod_rewrite is an Apache specific module. By default nginx does not support .htaccess files. You would instead write our your rewrites within your nginx configuration.

Have another answer? Share your knowledge.