容器技术交流

 找回密码
 立即注册
查看: 3059|回复: 1

请问Nginx的伪静态规则怎么弄

[复制链接]
发表于 2013-4-3 22:41:38 | 显示全部楼层 |阅读模式
请问各位大侠,我的程序服务商提供的APACHE伪静态配置规则为
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

IIS6伪静态配置规则
[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
RewriteRule /robots.txt /robots.txt [L]
RewriteRule /favicon.ico /favicon.ico [L]
RewriteRule /assets/(.*) /assets/$1 [L]
RewriteRule /install/(.*) /install/$1 [L]
RewriteRule /statics/(.*) /statics/$1 [L]
RewriteRule /upgrade/(.*) /upgrade/$1 [L]
RewriteRule /uploadfile/(.*) /uploadfile/$1 [L]
RewriteRule /manage.php(.*) /manage.php$1 [L]
RewriteRule ^/$ /index.php [L]
RewriteRule /index.php(.*) /index.php$1 [L]
RewriteRule /(.*) /index.php/$1 [L]


请问Nginx的伪静态规则是什么?怎么设置呢?
请各位帮我一下吧。

发表于 2013-4-5 04:39:41 | 显示全部楼层

if (!-e $request_filename)
{
rewrite (.*) /index.php;
}

试一下这个
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-5-11 15:54 , Processed in 0.033757 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表