VPS侦探论坛

标题: 阿帕奇的伪静态转换成nginx的伪静态 [打印本页]

作者: darkit    时间: 2013-10-25 16:21
标题: 阿帕奇的伪静态转换成nginx的伪静态
  1. Options +FollowSymLinks +ExecCGI


  2.   order allow,deny
  3.   deny from all



  4.   RewriteEngine On

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

  8.   # we skip all files with .something
  9.   RewriteCond %{REQUEST_URI} \..+$
  10.   RewriteCond %{REQUEST_URI} !\.html$
  11.   RewriteCond %{REQUEST_URI} !\.php$
  12.   RewriteRule .* - [L]

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

  17.   # no, so we redirect to our front web controller
  18.   RewriteRule ^(.*)$ index.php [QSA,L]
复制代码


这段代码如何转换成nginx支持的伪静态,各位大大能帮个忙吗?
作者: puffbaby    时间: 2013-10-25 17:35
网上有一个apcache 转换成ngixn 的 不过不知道是不是100%正确

http://www.anilcetin.com/convert-apache-htaccess-to-nginx/




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4