apache下的.htaccess文件中的伪静态,怎么转换成nginx下的伪静态呢?

54mark 发布于 2013/04/19 18:09
阅读 953
收藏 2
apache下的伪静态
RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The 
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to 
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size 
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
nginx下的伪静态该怎么写呢?跟apache实现的效果一样。。
弄了一天了。。配了个服务器,本来很激动。一看伪静态不行。。。求解答啊。
加载中
0
54mark
54mark
竟然没人看。。。
0
2007lf
54mark
54mark
这个只能对简单的进行转换。。我的放到这里面转换出错。。 现在已经搞定了
0
flamingbob
flamingbob
遇到同样的问题啊
0
flamingbob
flamingbob
求解决方案啊
flamingbob
flamingbob
回复 @54mark : 和你的一模一样
54mark
54mark
..要看你什么正则撒
0
baobao777
baobao777
我的和你一样 共享下啊 
返回顶部
顶部