http-status-code-301

Caching and HTTPS

吃可爱长大的小学妹 提交于 2020-01-15 11:39:11
问题 I've noticed something interesting while monitoring the network communications between my browser and server. It has something to do with caching. Say I have a CSS file http://domain.com/main.css (used in unsecured pages), which can also be accessed via https://domain.com/main.css (used in secured pages). When I first load an unsecured page, the CSS file gets a 200 OK . When I reload the page (or go to another unsecured page), I get a 304 Not Modified . When I go to a secured page for the

Caching and HTTPS

匆匆过客 提交于 2020-01-15 11:39:08
问题 I've noticed something interesting while monitoring the network communications between my browser and server. It has something to do with caching. Say I have a CSS file http://domain.com/main.css (used in unsecured pages), which can also be accessed via https://domain.com/main.css (used in secured pages). When I first load an unsecured page, the CSS file gets a 200 OK . When I reload the page (or go to another unsecured page), I get a 304 Not Modified . When I go to a secured page for the

Redirect wildcard subdomain without known domain - htaccess

六月ゝ 毕业季﹏ 提交于 2020-01-15 09:41:29
问题 What is the appropriate way to redirect via htaccess when a top level domain name is not known? My specific situation is this... Our company has a custom content management system that is used on several of our servers. Each server had a subdomain for each of our customers on that server. i.e. customerBob.exampleA.com customerLarry.exampleA.com customerJudy.exampleB.com customerAlice.exampleB.com We have many servers, each one hosting a group of customers. The subdomains were completely

Is a “404 redirect” a legitimate redirect?

久未见 提交于 2020-01-14 13:45:30
问题 I have a situation where some users may come to mistyped pages, from links, etc. In most situations I can determine the correct page that should be displayed, so I want to redirect to the correct URL. Is a 301 Redirect appropriate in this case. 301 means "Moved Permanently", but in this case the document wasn't there in the first place. Is it legitimate to set a 404 Not Found header, then redirect to the correct URL? 回答1: I'd use 301. Moved permanently is appropriate in that it tells the

redirecting url with parameters to same url without parameters

无人久伴 提交于 2020-01-14 02:58:07
问题 Using the file .htaccess, I am trying to redirect urls like this: http://www.mysite.com/a-page/?fp=123&sp=456&tp=789 to: http://www.mysite.com/a-page/ so basically redirecting url not caring about params values to the same url without any param. I have used RewriteCond/RewriteRule, Redirect and RedirectMatch but without any luck. My latest try was: RewriteCond %{QUERY_STRING} ^.+$ RewriteRule ^a-page/$ http://www.mysite.com/a-page/? [L,R=301] Any suggestion? 回答1: Well I have found a solution:

Ruby on Rails redirect how to pass params in routes file

与世无争的帅哥 提交于 2020-01-13 13:09:35
问题 We recently changed the product name on our website from 'bracelets' to 'wristbands' and need to keep the old routes around for SEO purposes. Essentially, these routes www.hostname.com/products/bracelets/series-1/ www.hostname.com/products/bracelets/series-1/small-purple should route to www.hostname.com/products/wristbands/series-1/ www.hostname.com/products/wristbands/series-1/small-purple I am reading the tutorial here http://guides.rubyonrails.org/routing.html#redirection and looks like i

Ruby on Rails redirect how to pass params in routes file

你。 提交于 2020-01-13 13:08:35
问题 We recently changed the product name on our website from 'bracelets' to 'wristbands' and need to keep the old routes around for SEO purposes. Essentially, these routes www.hostname.com/products/bracelets/series-1/ www.hostname.com/products/bracelets/series-1/small-purple should route to www.hostname.com/products/wristbands/series-1/ www.hostname.com/products/wristbands/series-1/small-purple I am reading the tutorial here http://guides.rubyonrails.org/routing.html#redirection and looks like i

Facebook like count resets after a 301 redirection

蓝咒 提交于 2020-01-13 02:43:40
问题 I have an article on my site that has published in a wrong category. I wanted to change the category, and since the category name is part of the url, I than added a 301 redirection to the updated url. That article had also several likes, but after the 301, it was reset to 0 likes, since to Facebook this is now as a new url with no likes. If I remove the 301 than the likes count is updated again. Is there a way to notify FB that a certain url is a result of a 301 that has likes count? I assume

How to 301 redirect in ASP.NET 4.0?

ⅰ亾dé卋堺 提交于 2020-01-10 01:23:06
问题 I am trying to implement URL redirect for the website rather than doing it page by page. I want to do it in the global.asax file. Below is the code i have defined. I want to have http://website.net as my main url & want to have a permanent URL redirect if someone types in http://www.website.net. Unfortunately it is not working for the live website. Can anyone point out the problem in the code. The code doesn't generate any error. void Application_Start(object sender, EventArgs e) { // Code

how to change url structure with 301 code q2a

六月ゝ 毕业季﹏ 提交于 2020-01-06 10:54:50
问题 I have a problem with duplicate contents in search engine . I can access a page in q2a web site using both of these url's ! http://www.domain.com/index.php?qa=1306&qa_1=title http://www.domain.com/1306/title I want to redirect the first one to second 1 how ca I do it ? I tried codes in these page and other things too but none of them works :( htaccess for changing index.php?ms=user to /user my current htaccess is : DirectoryIndex index.php <IfModule mod_rewrite.c> RewriteEngine On