title: htaccess rewrite to nginx config not working
body: <p>I'm having a problem converting an appache <code>.htaccess</code> file work with nginx.</p>
  
  <p>The <code>.htaccess</code> file</p>
  
  <pre><code>&lt;ifModule mod_rewrite.c&gt;
      Allow from 127.0.0.1
  
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
  
      RewriteRule ^index(|/)$ index.php
      RewriteRule ^logout(|/)$ logout.php
      RewriteRule ^keeping/([^/.]+)(|/)$ keeping.php?s=$1
  &lt;/ifModule&gt;
  </code></pre>
  
  <p>My Conversion: </p>
  
  <pre><code>location / {
      if (!-e $request_filename){
          rewrite ^/index(|/)$ /index.php;
      }
  }
  location /logout {
      rewrite ^/logout(|/)$ /logout.php;
  }
  location /kyhsadminpanel {
      rewrite ^/keeping/([^/.]+)(|/)$ /keeping.php?s=$1;
  }
  </code></pre>
  
  <p>doesn't work.</p>
  
  <p>It always shows "404 not found" for url's such as <code>/kyhsadminpanel/keeping/index</code>
  and <code>/kyhsadminpanel/keeping/news</code>...</p>