0

I'm new to nginx, but I'm trying to convert

# Disallows file browsing
Options -Indexes
# Custom Error Pages
ErrorDocument 403 /error-docs/403.php
ErrorDocument 404 /error-docs/404.php
ErrorDocument 500 /error-docs/500.php
# Turn on the Apache Rewrite Engine
RewriteEngine On
#Conditional to see if it is a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# If not then pass the query string to index.php and stop any further rules
RewriteRule (.*) index.php/$1 [PT,L]

to nginx syntax. I've tried the suggestion at Routing requests through index.php with nginx but it doesn't do quite what I need it to do. I've also tried the auto converters http://winginx.com/en/htaccess and http://www.anilcetin.com/ but the rules they output don't work for me either. Any help is appreciated.

Community
  • 1
  • 1
  • http://stackoverflow.com/questions/14927184/converting-htaccess-to-nginx-mod-rewrite/14967560#14967560 – regilero Dec 09 '14 at 13:14

1 Answers1

0

The issue I had was actually related to my PHP and MySQL code.

location / {
    try_files $uri $uri/ /index.php$args;
}

works fine. Thanks for the link.