服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. nginx
  3. Nginx重写URL
Intereting Posts
简单的速率限制 数据库触发器是否对整体数据库function有性能影响? 将文件安全从一台服务器移到另一台(asp.net站点,IIS) Haproxy 1.5.3 / OpenSSL – 创buildPEM wiredx的替代品 将/ var移动到新的一组磁盘 焦油不保留所有者/权限 升级FreeBSD / Ubuntu之间的进程 域名到虚拟主机(DNS设置) 服务器在WHM自动更新后不稳定 如何禁用pfsense中的NTP? 如何自动删除共享驱动器上的/ tmp文件夹? WiFi掉线连接 – 该地区有多个AP – 如何链接到一个AP并locking 将大表从MyISAM转换到Innodb Commvault Oracle RMAN恢复到新主机

Nginx重写URL

我想获取user-name和account_id (在例子'1'末尾的数字)从这个URL

http://abc.com/desinger/user-name_1.html

我已经试过这个规则,但我不能得到account_id

 rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last; 

  • 设置nginx只能通过一个子域来提供静态的服务
  • Nginx的默认主机没有定义的时候
  • 无法在Amazon EC2上设置nginx Web服务器
  • 有没有一个Nginxconfiguration来阻止IE10 DNT?
  • nginx tmp文件文件夹运行磁盘空间

  • 阻止用户代理访问
  • 清漆/ HaProxy / Nginx
  • Apacheredirect到www-prefixed URL的问题
  • 乘客企业版 – “大众部署”澄清
  • 解谜:开启https时显示php代码
  rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last; 

你错过了正则expression式中的.html,应该是

  rewrite ^/desinger/(.+)_([0-9]+).html$ /index.php?m=USER&hdn_account_id=$2 last; 
  • 一般情况下,拒绝Nginx请求而不进行身份validation
  • NGinx重写规则和发布参数
  • configurationmunin-node为nginx
  • Nginx:从根目录的子目录中提供一个应用程序
  • 设置Nginx的网站,对Ajax的反应不同?
  • ngnix和避免雷鸣的场景
  • 使用PHP / nginx启用openssl
  • Dreamhost上的nginx VPS为两个小网站使用了大量的内存
  • 如何设置Apache从nginx捕获proxy_pass?
  • $ _SERVER中使用nginx作为反向代理的HTTPSvariables

  • © 2017 服务器 Gind.cn
  • Topics
  •        
  • Powered by Server
  • Privacy Policy