http-status-code-301

Using .htaccess to redirect domain.co.uk/index.html to www.domain.co.uk

这一生的挚爱 提交于 2019-12-11 07:45:40
问题 I have noticed that search engines have been crawling both the domain.co.uk and www.domain.co.uk versions of a web site that I've recently developed. Using .htaccess I have been able to setup http 301 redirects so that: http://domain.co.uk is redirected to http://www.domain.co.uk and http://www.domain.co.uk/index.html is redirected to http://www.domain.co.uk However: http://domain.co.uk/index.html does not get redirected to http://www.domain.co.uk as I would expect. Instead the redirect goes

ServerXMLHTTP request returing data but not returning url of final page after 301 redirection

狂风中的少年 提交于 2019-12-11 05:55:51
问题 I am trying to make LINK FINDER app in ASP It working is divided into 5 step Send http request to server at www.foo.com Check status of request If its 200 then move to step 4 otherwise show error Parse all link Send http request to server to parsed link I am able to do first 4 step, But facing challenge in 5th step I am getting 3 type of links 1.)absolute link : http://www.foo.com/file.asp 2.)links from root directory, which need domain name eg /folder2/file2.asp 3.)relative link : ../file3

Dealing with a 301 and location headers for a REST response in cross-domain

穿精又带淫゛_ 提交于 2019-12-11 05:20:00
问题 I am using Angularjs Chrome 35.0 and Firefox 30.0. I need to make Rest requests to an API. Every single request which have 200,201,404 (...) as response does work well. Some of those responses with a 301 and a location header. my javascript this.folder = function(folder) { var url = config.domain + '/' + folder.key; var methods = resource(url, null, { 'move': { method: 'PUT', params: { 'move': '' }, headers: { 'copy-source': '/path/to/' + folderKey }, url: config.domain + '/path/to/' + newKey

.htaccess redirect all pages except the home page

孤街浪徒 提交于 2019-12-11 05:12:52
问题 I have just merged two websites. Site A is now merged with site B. Site A has got a .htaccess file which redirects all of the content to the new domain where site B is hosted. RewriteRule (.*) http://www.siteb.com/$1 [R=301,L] It is working perfectly, however, I need the homepage of site A not to redirect. What do I need to add to the code above to make that happen? 回答1: Just change .* to .+ to make sure your regex pattern isn't matcinng landing page: RewriteRule (.+) http://www.siteb.com/$1

Dynamic 301 Redirect

为君一笑 提交于 2019-12-11 05:04:02
问题 We made a mistake in the scope of our dynamic pages on a new site, and have some incorrect pages already spidered in Google. I need to redirect the following format: http://www.domain.com/dir/dir/?q=120 To this format: http://www.domain.com/dir/dir/?p=120 Only difference is the 'q' needs to be a 'p'. RewriteEngine is on, as I've already consolidated traffic from domain.com to www.domain.com This is what I have in my root .htaccess file: Options +FollowSymLinks RewriteEngine on RewriteCond %

301 redirect with PHP and MySQL on 404

痴心易碎 提交于 2019-12-11 04:54:57
问题 I am transferring a large static website of 500+ pages to a Joomla installation but what I am wanting to do, rather than code a 500+ line .htaccess file, is to use PHP's built in 301 header redirect to dynamically redirect requests that come in to the new URL. So for example, after I move the site, the following URL would 404 without a redirect- http://www.foo.com/old_page.html I would want it to redirect to http://www.foo.com/old-page.php So I would like to create a MySQL database of old

SEO and Duplicate URLS

♀尐吖头ヾ 提交于 2019-12-11 03:54:58
问题 I'm updating a website's menu system and adding SEO urls. I'll have two URLs pointing to a similar resource for a while but only one of them will be rendered on the menu. Should I leave the old URLs or delete them? If I leave them then google results wont link to 404 pages but they may be considered as spam. Should I redirect them perhaps? 回答1: Definitely use a 301 permanent redirection, this is what it's meant for. It'd be nice to keep the old URLs up (with 301 redirects) as long as is

301 redirect everything to new website root/whole site including sub pages? Moved Permanently

ε祈祈猫儿з 提交于 2019-12-11 03:25:29
问题 QUICK UPDATE Ok getting there Is this mod_alias? RedirectMatch 301 ^/ http://brightmist.co.uk/ I've added this one line of code underneath everything and it appears to work, however my other directories such as http://brightmist.co.uk/blog/2013/02/23/manchester-art-gallery-feb-2013 are telling google these pages have temporarily moved - see http://www.internetofficer.com/seo-tool/redirect-check/ Does this mean I have to go right the way though my site and add a tone of redirects? ORIGINAL

301 Redirect Specific Pages in Nginx BEFORE Redirecting Entire Domain/Catch All

大兔子大兔子 提交于 2019-12-11 02:19:32
问题 I have thousands of pages to 301 redirect in nginx. I can achieve this using return 301 https://www.newdomain.com$request_uri; However, there is approximately 6 pages that I would like to redirect to a changed slug/path on the new domain, eg location /old-path/ { rewrite ^ https://www.newdomain.com/newpath/ permanent; } I have tried but can't see to work out how to redirect these 6 first, specifically, and then have the catch all rule apply to everything else. At the moment I am redirecting

How can I send a 301 Permanent Redirect with ASP.NET?

空扰寡人 提交于 2019-12-10 10:57:18
问题 I need to permanent redirect some pages, and redirect the user to the new URL as well. This code only sets the correct headers. The user are not redirected. public static void PermanentRedirect(this HttpResponse response, string newUrl) { response.Status = "301 Moved Permanently"; response.StatusCode = 301; response.AddHeader("Location", newUrl); } If I put: Response.Redirect(newUrl); at the end, a 302 Temporary Redirect is performed. How can I 301 redirect the user? Related Questions: How do