nginx下/index.html到/的301跳转
来源:互联网 发布:通州梨园淘宝城 编辑:程序博客网 时间:2024/06/06 03:50
网站负责seo的同事要求,设置网站/index.html到/的301跳转(网站默认首页是index.html)。
刚开始效仿不带www的域名到带www的域名的301跳转,用rewrite进行设置,会死循环。
后来发现,可以用return实现:
if ($request_uri = /index.html) {
刚开始效仿不带www的域名到带www的域名的301跳转,用rewrite进行设置,会死循环。
后来发现,可以用return实现:
if ($request_uri = /index.html) {
return 301 http://www.domain.com/; }
0 0
- nginx下/index.html到/的301跳转
- nginx下yaf路由始终定位到index/index/index下的解决方法
- 请问,为什么我直接在地址栏里输入文件夹,却不会自动跳转到文件夹下默认的index.html
- springmvc 如何跳转到根目录下的index.jsp页面
- springmvc 如何跳转到根目录下的index.jsp页面
- NGINX下的目录跳转
- 导出当前目录下所有文件的路径到index.html
- nginx去掉index.html改为index.php
- nginx 404 跳转到自定义的页面
- phpcms安装后网站首页跳转到Install/install/index.html
- html实现跳转到其它的页面
- 项目二级目录下的index.php使用nginx重写
- 从index.jsp跳转到showMain.jsp
- 默认页面index.jsp跳转到*.action
- nginx添加301跳转到HTTPS并保留部分80端口的URL
- nginx http 跳转到https
- nginx 设置错误的自定义404页面跳转到500
- nginx 设置错误的自定义404页面跳转到500
- 常用功能记录
- print_r与var_dump的区别
- [BZOJ1913][Apio2010]signaling 信号覆盖(计算几何+组合数学)
- python json.dumps() json.dump()的区别
- Apktool rebuild失败:No resource found that matches the given name
- nginx下/index.html到/的301跳转
- for 续6
- 十大Intellij IDEA快捷键
- Codeforces 669D Little Artem and Dance【思维】好题!好题!
- 不同Context对象创建的LayoutInflater对象也不同
- Longest Ordered Subsequence [dp]
- CVPR 2017-02-06
- 几个context上下文
- Spring事务管理