admin管理员组

文章数量:1180430

Or does it have to be server side?

Currently google requires all sites to 302 to a page rather than the usual pages.

How do I do so with javascript? Can I just print a 302 code in meta or something?

Note: sorry. This is not google for search engine. This is google the feed provider for bodis above namedrive and a bunch of other guy.

I am a domain parker. I get domains ranked at search engine and move traffic somewhere else. The problem is google now prohibit URL forwarding. I am just thinking how do I maintain my ranking with more transparent forwarding such as 302. The destination URL is pretty, I would say blank.

Or does it have to be server side?

Currently google requires all sites to 302 to a page rather than the usual pages.

How do I do so with javascript? Can I just print a 302 code in meta or something?

Note: sorry. This is not google for search engine. This is google the feed provider for bodis.com above.com namedrive.com and a bunch of other guy.

I am a domain parker. I get domains ranked at search engine and move traffic somewhere else. The problem is google now prohibit URL forwarding. I am just thinking how do I maintain my ranking with more transparent forwarding such as 302. The destination URL is pretty, I would say blank.

Share Improve this question edited Nov 19, 2019 at 23:03 Reed 15k8 gold badges71 silver badges113 bronze badges asked Oct 5, 2011 at 7:46 user4951user4951 33.1k55 gold badges178 silver badges289 bronze badges 3
  • Seeing as how you're talking about Google, is this SEO related? – user684934 Commented Oct 5, 2011 at 7:58
  • @bdares I think so, 302 is needed if you want to get the same pr of the redirected domain. – Gianpaolo Di Nino Commented Oct 5, 2011 at 8:03
  • On a side note: Why did you want to do this with javascript? Can't you use PHP? – Dennis Commented Oct 5, 2011 at 8:11
Add a comment  | 

1 Answer 1

Reset to default 36

This is how a 302 redirect works:

HTTP 302 means found. In a way, the server tells the client where to retrieve the page it requested.

Example:

The client sends:

GET /index.html HTTP/1.1
Host: www.yourdomain.com

The server responds:

HTTP/1.1 302 Found
Location: http:/yoursubdomain.someotherdomain.com/somefolder

This is why you couldn't achieve a 302 redirect using javascript. It's part of the HTTP protocol. No page gets loaded by the client's browser before the redirect is performed.

本文标签: Can we do 302 redirect with javascriptStack Overflow