服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. 重写 nginx
  3. 仅redirect主页
Intereting Posts
Windows 2003 IIS FTP服务器迁移w /用户帐户 查询多个服务器上的EXE详细信息 可以改变tty提高编译速度吗? 在服务器2008 R2上,没有足够的时间来保存所有的Hyper-V虚拟机 跨数据中心的IIS7故障转移群集 PFsense不能与第二个子网一起工作 是否有可能从命令行中杀死一个基于其环境的进程? 平-a不返回主机名 CentOS 7:电源button在用户login之前不能关机(不在之后) 如何知道现成的交换机是否支持vlan? 无法在端口转发时强制使用无密码ssh身份validation DDOS降低安全连接限制? 与Windows下的Megaraid SMART 如何备份Windows任务计划程序任务? 与Windows机器共享Samba共享时出现“只读”问题

仅redirect主页

我只需要将http://shop.test.comredirect到http://www.test.com/fedex-orders/

只是主页。 没有其他的。 即http://shop.test.com/?page=blog不应该redirect。

  • nginx用参数重写url
  • nginx不区分大小写重写
  • 从外部来源维护nginx中的redirect
  • 禁用nginx代理中的URL解码
  • 使用nginx重写“隐藏”.html文件扩展名
location = / { return 301 http://www.test.com/fedex-orders/; } 

使用= in location = /指定URL必须与/完全匹配,没有任何其他的前后任何内容。

如果你在Apache中寻找答案如何解决这个问题; 这将是你想要的:

 RedirectMatch permanent ^/$ http://www.test.com/fedex-orders/ 
  • 如何使用HttpRewriteModule快速轻松地移除Nginx中的一部分URL?
  • 如何导出URL重写规则?
  • HAProxy reqrep删除后端请求的URI
  • 我怎样才能强制我的url始终以www开头?
  • 在nginx日志中,nginx + PHP-FPM =“permission denied”错误13; configuration错误?
  • Nginxvariables$ host,$ http_host和$ server_name有什么区别?
  • 如何将HTML代码注入到每个交付的HTML页面?
  • 如何重写Nginx反向代理中的Set-Cookie的域部分?
  • Nginx – nginx.conf位置块中〜(代字号)的含义?
  • nginx url重写:break和last的区别

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