migrating from apache, need help on some rewrite rules
November 21, 2017 06:11AM

I would need some help to convert some apache rewrite rules to nginx,

here is the apache version:
<Location ^/mywebapp>
Order Deny,Allow
Deny from all
Allow from
Allow from
Allow from
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !app_dev\.php/.*
RewriteCond %{REQUEST_URI} !app\.php$
RewriteRule (.*) app.php [QSA,L]

here is what I have in nginx:
location ~ ^/mywebapp {
deny all;

location ~ app_dev\.php/.* { }
location ~ app\.php$ { }
if (!-e $request_filename){
rewrite ^(.*)$ app.php break;

which does not work as intended. Can someone point me where I'm wrong ?

Kind Regards

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready