http-status-code-301

Process data BEFORE a 301 Redirect?

女生的网名这么多〃 提交于 2020-01-06 06:54:32
问题 So, I've been working on a PHP link shortener (I know, just what the world needs). Basically when the page loads, php determines where it needs to go and sends a 301 Header to redirect the browser, like so... Header( "HTTP/1.1 301 Moved Permanently" ); header("Location: http://newsite.com"; Now, I'm trying to add some tracking to my redirects and insert some custom analytics data into a MySQL table before the redirect happen. It works perfectly if I don't specify the a redirect type and just

Process data BEFORE a 301 Redirect?

那年仲夏 提交于 2020-01-06 06:54:20
问题 So, I've been working on a PHP link shortener (I know, just what the world needs). Basically when the page loads, php determines where it needs to go and sends a 301 Header to redirect the browser, like so... Header( "HTTP/1.1 301 Moved Permanently" ); header("Location: http://newsite.com"; Now, I'm trying to add some tracking to my redirects and insert some custom analytics data into a MySQL table before the redirect happen. It works perfectly if I don't specify the a redirect type and just

PHP header 301 redirect not working due to browser cache

倖福魔咒の 提交于 2020-01-05 04:01:37
问题 My code is the following: <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://newsite.com/"); ?> The issue I am having is several users have already reported the page not redirecting them and instead showing them the content on the old page, but later in the day it showed the correct redirect. I know it has to be related to the caching but which is the most efficient and standardized way to bypass the cache for the above redirect? Would I use php or javascript? Thank you.

SEO friendly 301 redirect .htm to .aspx

倖福魔咒の 提交于 2020-01-04 23:22:31
问题 I currently have a small-midsize website with .htm extensions. I have redesigned the full website, this time using a .aspx extension. I want to issue 301 redirects to keep my search engine rankings, but am unsure of how to do so from an .html page in a spider friendly way. With research I have repeatedly encountered references to ISAPI redirects (but no where can I seem to find a full explanation, just a link to isapiredirect.com, which does not load). Other than this I have been advised to

SEO friendly 301 redirect .htm to .aspx

↘锁芯ラ 提交于 2020-01-04 23:22:30
问题 I currently have a small-midsize website with .htm extensions. I have redesigned the full website, this time using a .aspx extension. I want to issue 301 redirects to keep my search engine rankings, but am unsure of how to do so from an .html page in a spider friendly way. With research I have repeatedly encountered references to ISAPI redirects (but no where can I seem to find a full explanation, just a link to isapiredirect.com, which does not load). Other than this I have been advised to

SEO - 301 redirect via 404 page

不问归期 提交于 2020-01-04 04:32:07
问题 I am new to this so I will try to explain myself clearly. I am doing my 301 redirect from a custom 404 page. Now I got it working my question is more regarding how google would treat this. Cause we going to a 404 page would google just record it as a 40 page or would it actually record the 301? As i said I am new to this and have looked through google to try and find an answer to this. Anyway any help or comment would be greatly appriciated. thanks in advance 回答1: Best practice in this case

How can I call global.asax on .asp page open

六眼飞鱼酱① 提交于 2020-01-04 04:22:06
问题 Hi on redirecting of catalogsmain.asp I want to call Global.asax file and in that I want to call Application_BeginRequest method. Actual I have one old website which is created in old ASP so it contains all page with extension .asp. Now we had created that same website in MVC and now what we need to do is that when any user search on google and click to the SEO link it will open that site as www.abc.com/product.asp which will redirect it to IIS 404 error as product.asp page will not be there

Can you detect a 301 redirect with Microsoft.XMLHTTP object?

我与影子孤独终老i 提交于 2020-01-04 02:18:28
问题 I'm using VBScript and the Microsoft.XMLHTTP object to scrape some web data. I have a list of URLs to check, but unfortunately some of them 301 redirect to others on the list, so I wind up with redundant data. Is it at all possible to make the XMLHTTP object fail on 301 redirect? Or at least cache the original response header? Or otherwise just let me know what happened? (notes: I have no control over the server I'm requesting data from; when I get new data, I could check if it's redundant,

301 Moved Permanently

怎甘沉沦 提交于 2019-12-30 10:40:49
问题 I'm trying to get HTML by URL in Java. But 301 Moved Permanently is all that I've got. Another URLs work. What's wrong? This is my code: hh= new URL("http://hh.ru"); in = new BufferedReader( new InputStreamReader(hh.openStream())); while ((inputLine = in.readLine()) != null) { sb.append(inputLine).append("\n"); str=sb.toString();//returns 301 } 回答1: You're facing a redirect to other URL. It's quite normal and web site may have many reasons to redirect you. Just follow the redirect based on

HTTP redirect: 301 (permanent) vs. 302 (temporary)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-27 10:42:48
问题 Is the client supposed to behave differently? How? 回答1: Status 301 means that the resource (page) is moved permanently to a new location. The client/browser should not attempt to request the original location but use the new location from now on. Status 302 means that the resource is temporarily located somewhere else, and the client/browser should continue requesting the original url. 回答2: When a search engine spider finds 301 status code in the response header of a webpage, it understands