服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. 重写 nginx
  3. 仅redirect主页
Intereting Posts
VPNnetworking间歇性地不能提供互联网:可能的原因是什么 服务器在国家X.来自Y国家的大多数用户加载时间是不可接受的 允许父级.htaccessredirect所有资产 区分谷歌服务器的垃圾邮件 Python脚本通过Cron运行时崩溃 PuTTY / PSFTP&Pageant。 select特定的键 如何摆脱局域网中的NAT? 用户从CSVDE导入后用户login名称不正确 迁移到Exchange 2007 – Outlook提示凭据 构buildWindows服务器群集hpc 如何将虚拟机桥接到远程networking? apache – 后端和nginx – 前端修复 哈德森/jenkins:需要帮助开始定制工作 Nginx SSL_write()失败 在Centos 7上用一个来自一个仓库的httpdreplace一个仓库中的httpd

仅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