.htaccess

Francis Daly francis at daoine.org
Tue Jun 30 09:51:09 UTC 2020


On Sat, Jun 27, 2020 at 06:49:51PM -0300, Zonimi wrote:

Hi there,

> Hello, I would like to know how do I convert this to nginx;
> 
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteCond %{REQUEST_URI} !(/$|\.)
> RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
> 
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> 
> RewriteRule . index.php [L]
> </IfModule>

Can you describe how you want requests to be handled? It's not immediately
clear to me what that apache config is trying to do.

> Already tried;
> 
> location / { try_files $uri $uri/ /index.php; }

That looks like it is probably the "standard" close-enough equivalent;
but obviously some part of it does not work in this case.

> And none works

What request do you make?
What response do you get?
What response do you want to get instead?

Thanks,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list