服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. 重写 nginx
  3. 仅redirect主页
Intereting Posts
Openvswitch安装问题 为什么我找不到页面(404)的正确链接? 如何从RDP会话踢人 在RH Linux上更改logwatch的发件人电子邮件 Amazon CodeDeploy在无效证书上失败 Domino旅行者资源使用情况 Docker:为不同的容器运行Cronjob 有什么工具可以用来轻松地监控Linux上每个进程的内存使用情况吗? 使用Windows 2008将磁盘从HP DL360g5移动到DL380g6 SQL群集2008和iSCSI 在访问消息编辑器中的通讯录时,Outlook 2007挂起 Autossh在一段时间后死亡 如何在服务器上安装旧的软件包? 服务器login失败 重复监控警报

仅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