http-status-code-301

Remove query strings from 301 redirect

混江龙づ霸主 提交于 2019-12-18 13:22:45
问题 I am struggling to create appropriate 301 redirects for a site that was originally built using query strings. The old URL structure looks like this: http://www.oldsite.com/about/index.cfm?fuseaction=cor_av&artID=5049 I want to redirect the entire subfolder (named 'about') to a new page on the new domain. The new domain's URL looks like this: http://www.newsite.com/info So, I set up a redirect that looks like this: redirectMatch 301 ^/about/ http://www.newsite.com/info It is redirecting just

PHP 301 Redirect, Impossible?

浪子不回头ぞ 提交于 2019-12-18 11:48:41
问题 I have been trying to do a proper 301 redirect and have failed to do so. No matter what i try, its always a 302 redirect. Returns a 302: http_redirect("urlgoeshere", '', false, HTTP_REDIRECT_PERM) Returns a 302: header("HTTP/1.1 301 Moved Permanently"); header("Location: urlgoeshere"); Can anyone explain why these are coming back as 302's and not 301's? Server OS is linux, running PHP/5.2.14. Try it yourself. I will give you guys a URL to try. I am testing using YSlow and Googlebot. Should be

Use 301 Redirect In Google Blogger/Blogspot

故事扮演 提交于 2019-12-18 04:55:07
问题 I have a Google Blogger blog where I blog. Sometime ago, I posted a post but now after getting new data, I updated that post and I got new URL of that post. But I have a lot of backlinks to that old URL and now when they are htiing then they are getting 404 page that is a bad SEO. Now I want to use 301 Redirect to redirect old URL to new URL. For this purpose, I know that we have to use .htaccess and add Redirect 301 OLD_POST_URL NEW_POST_URL but Google Blogger doesn't offer to edit .htaccess

Using regular expression in htaccess for 301 redirects

强颜欢笑 提交于 2019-12-18 03:33:28
问题 I have a Wordpress blog where I am redirecting blog posts from my old blog to my new blog in the format below: The old blog is called 'News' and the new blog is simply called 'Blog' - both exist on the same domain in a subdirectory as indicated below. OLD 'News' blog structure http://www.example.com/news/new-android-os-3431 NEW 'Blog' blog structure http://www.example.com/blog/new-android-os Essentially this redirect needs to do 2 things:- Redirect to 'blog' directory Retain the post name in

Does 301 redirect always preserve referrer?

北战南征 提交于 2019-12-18 03:01:57
问题 I want to know whether 301 redirect always preserve referrer. I make a page called "gotoorig_https.html" which contains a hyperlink to a page "orig_https.asp". "orig_https.asp" will 301 redirect to "dest.html" which shows the document.referrer. In this case, http page(gotoorig_https.html) -> orig_https.asp(301 redirect)-> https page (dest.html) <--the referrer preserves https page(gotoorig_https.html) -> orig_https.asp(301 redirect)-> https page (dest.html) <--the referrer preserves I also

htaccess multi language site with sub directories, and default 301

前提是你 提交于 2019-12-18 02:40:58
问题 I am having some issues setting up my htaccess to allow multiple languages utilising the sub directory method eg: http://www.domain.com/en/ http://www.domain.com/sw/ http://www.domain.com/ie/ Also to complicate things, the project isn't currently live, its on a dev server. For example, I am currently accessing the project at: http://dev.domain.com/devname/projectname/ And I want the above to automatically 301 redirect to: http://dev.domain.com/devname/projectname/en/ Here is my htaccess:

StackOverflow like URL Routing

自古美人都是妖i 提交于 2019-12-18 01:14:28
问题 Its my understanding that the questions in StackOverflow has the following format http://stackoverflow.com/questions/{question-id}/{slug-made-from-question-title} So basically the question is retrieved using the question-id. so whatever value I give the slug is immaterial. First I would like to know whether this understanding is wrong :) I have a URL http://stackoverflow.com/questions/6291678/convert-input-string-to-a-clean-readable-and-browser-acceptable-route-data Then I changed the slug

Redirecting 404 error with .htaccess via 301 for SEO etc

血红的双手。 提交于 2019-12-17 17:34:08
问题 I couldn't find a straight answer to my question and need to know it from the real experts. I had a website which urls were generated by Joomla. I believe that tons of urls are around in the search engines and I really don't know which of them all. A 302 redirect would be an option, but I can't say which urls need to be redirected. The only thing I know that all the urls were generated by a sef404 script, it's a SEO script for Joomla. My question, how can I make sure that all the orphan urls

Htaccess redirect all files from subdirectory in one domain to another domain

天涯浪子 提交于 2019-12-17 16:29:30
问题 I am trying to create a permanent htaccess redirect (301) from all files in one directory in one domain, to another domain as follows: Redirect all files in the following directory: http://www.primary.com/apples/* To: http://www.secondary.com I am not very experienced with htaccess and was wondering if someone can assist me in creating this redirect? Many thanks in advance! 回答1: This should work in one .htaccess file at primary.com root directory: Options +FollowSymlinks -MultiViews

301 Redirecting URLs based on GET variables in .htaccess

一世执手 提交于 2019-12-17 14:28:51
问题 I have a few messy old URLs like... http://www.example.com/bunch.of/unneeded/crap?opendocument&part=1 http://www.example.com/bunch.of/unneeded/crap?opendocument&part=2 ...that I want to redirect to the newer, cleaner form... http://www.example.com/page.php/welcome http://www.example.com/page.php/prices I understand I can redirect one page to another with a simple redirect i.e. Redirect 301 /bunch.of/unneeded/crap http://www.example.com/page.php But the source page doesn't change, only it's