Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My wordpress is telling me to update my htaccess file to:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I'm using nginx, and I have this but it doesn't work:

 location / {
            root   /home/mywebsite/public;
            index  index.php index.html index.htm;

            if (!-e $request_filename) {
                        rewrite ~(.+)$ /index.php?q=$1 last;
share|improve this question
Wordpress will keep complaining about not having htaccess as it can't understand why anyone would not use Apache. If your site works then you should be good. – Martin Fjordvald Nov 27 '10 at 12:59

try changing it to this;

   location / {
       root   /home/mywebsite/public;
       index index.php index.html index.htm;
       try_files $uri $uri/ /index.php;


share|improve this answer
That worked! Thanks for the info. – Utkarsh Sinha Mar 3 '12 at 21:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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