服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. 重写 nginx
  3. 仅redirect主页
Intereting Posts
RAID控制器回写性能 如何在Amazon EC2上configurationkeepalived? 在Ubuntu中生成已安装的软件包列表 Windows Server 2012 R2,Hyper-V虚拟机的DHCP不起作用 如何删除Windows XP中的所有“高级用户”权限 比cpu上下文切换更多的中断 更改名称服务器后,无法find服务器DNS地址错误 Mcafee从UNCpath问题自动更新 rsync只有在svn控制下的文件 cygwin scp到linux box损坏的文件,而winscp修复了损坏? 每次更改后刷新鱿鱼规则 如何统计Postfix中单个账户发送的电子邮件数量? Python,IIS脚本和用户帐户 Apache目录权限问题 在常规使用过程中,由远程主机closures的“Virtualbox / Vagrant”

仅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