2013-03-23 38 views
0

我正在嘗試將/anything/index.php重寫爲Nginx中的/ anything /。我已經Bing了,但沒有任何幫助。任何人都可以幫助我。在Nginx中將/anything/index.php重寫爲/ anything/

+0

的[nginx的重定向循環,除去從URL的index.php]可能的複製(http://stackoverflow.com/questions/21687288/nginx-redirect-loop-remove-index-php-from-url) – cnst 2016-07-03 00:04:41

回答

0

這樣的事情呢?

rewrite ^/(.*)/index.php /$1/ last; 
+0

此答案不正確;它會導致重定向循環。 – cnst 2016-07-03 00:05:51