Welcome! Log In Create A New Profile

Advanced

apache the rewrite to change the nginx rewrite there is some question

Posted by t14ner 
apache the rewrite to change the nginx rewrite there is some question
March 23, 2012 06:11AM
apache rewrite

RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

I want to change into the nginx rewrite

How should I do?
Re: apache the rewrite to change the nginx rewrite there is some question
April 11, 2012 11:00AM
Hi, was trying to make exact same block work, but unfortunately.

basically in nginx it translates like this:

try_files $uri $uri/ /index.php;

and maybe even like this:

try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php/$1 break;
}

tried many methods, but it never passes to index.php anything.
like www.example.com/zf/sync should send /sync to /zf/index.php, but it doesn't

like www.exmaple.com/index.php/block/file should send /block/file to index.php, but it doesn't, while on apache it works without any rewrites.
Re: apache the rewrite to change the nginx rewrite there is some question
April 12, 2012 10:49AM
*BUMP*
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 254
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready