VPS侦探论坛

 找回密码
 注册
查看: 4351|回复: 1

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

[复制链接]
发表于 2013-10-25 16:21:12 | 显示全部楼层 |阅读模式

  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支持的伪静态,各位大大能帮个忙吗?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2013-10-25 17:35:34 | 显示全部楼层


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

http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-25 03:22 , Processed in 0.025537 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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