Complex url rewriting

B.R. reallfqq-nginx at yahoo.fr
Mon Nov 23 19:43:35 UTC 2015


Hello,

You do not necessarily need to *redirect* *per se*, but you wish content to
be served by your index.php files.

Would
location /index.php {
    location ~* (?:.*/index.php)(.*) {
        fastcgi_param SCRIPT_FILENAME $document_root$1;
        fastcgi_pass <your upstream>;
    }
}
do the job? (untested)
---
*B. R.*

On Mon, Nov 23, 2015 at 7:19 PM, lmauldinpe15 <nginx-forum at nginx.us> wrote:

> Another note, on some of the application sub directories, I need to emulate
> this rule from .htaccess: RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php/$1
> [QSA,L]
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,263024,263026#msg-263026
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151123/fecca1b4/attachment.html>


More information about the nginx mailing list