登录什么样的HTTP重定向? [英] What kind of HTTP redirect for logins?

查看:112
本文介绍了登录什么样的HTTP重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试访问主页时将用户重定向到登录页面。

I'm currently redirecting users to a login page when they try to hit their home page.

例如: http:// www.goals.com/login.php?from=%2Fhome.php

不幸的是,我也被告知302重定向会伤害SEO ,这种类型的重定向显示为302.这是这种重定向的正确HTTP状态代码,还是我应该遵循更好的做法?

Unfortunately, I'm also told that 302 redirection hurts SEO, and this type of redirection is showing up as a 302. Is this the correct HTTP status code for this type of redirection, or is there a better practice I should be following?

推荐答案

如果主页受密码保护,SEO无关紧要。抓取者无法登录以查看内容,因此您的担忧没有实际意义。

SEO doesn't matter if the homepage is password protected. Crawlers can't login to see the content, so your concern is moot.

这篇关于登录什么样的HTTP重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆