darkit 发表于 2013-10-25 16:21:12

阿帕奇的伪静态转换成nginx的伪静态

Options +FollowSymLinks +ExecCGI


order allow,deny
deny from all



RewriteEngine On

# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /

# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule .* -

# we check if the .html version is here (caching)
RewriteRule ^$ index.html
RewriteRule ^([^.]+)$ $1.html
RewriteCond %{REQUEST_FILENAME} !-f

# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php


这段代码如何转换成nginx支持的伪静态,各位大大能帮个忙吗?

puffbaby 发表于 2013-10-25 17:35:34

网上有一个apcache 转换成ngixn 的 不过不知道是不是100%正确

http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
页: [1]
查看完整版本: 阿帕奇的伪静态转换成nginx的伪静态