Home  >  Q&A  >  body text

apache - please help 'translate' .htaccess to nginx

Please help me take a look, I only know that the second one means, if it is not a file or folder, redirect to
For example, visit http://www.abc.com/def
http://www.abc.com/index.php?_url=/def

nginx officially has this document...but I can't understand it...
http://nginx.org/en/docs/http/converting_rewrite_rules.html


RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]

PHP中文网PHP中文网2713 days ago423

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 17:04:16

    here

    reply
    0
  • Cancelreply