In asp.net you can cache your page. You can vary the output cache by the followingThe query string in an initial request (HTTP GET).Control values passed on postback (HTTP POST values).The HTTP headers passed with a request.The major version number of the browser making the request. A custom string in the page. In that case, you create custom code in the Global.asax file to specify the page's caching behavior.Link: http://msdn2.microsoft.com/en-us/library/xadzbzd6(VS.80).aspxyou can set the output caching for your GetImage.aspx, so that you dont have to requery the database every image request ,but you must use varybyParam , so that you have a cached version for every parameters arrangement:set the output cache for your page like this :At top of ASPX page: <%@ OutputCache Duration="600" VaryByParam="ID,Height,Width" %>VaryByParam attribute allows you to vary the cached output depending on the query string.Adding this will make your images cached for 600 seconds, so that if the image request within this period ,the cahed version will be returned
I'm looking to use an .htaccess file to use mod_rewrite to switch the protocol from http:// to https:// when someone hits my website.
For instance, once someone goes to:
http://www.mywebsite.com/
I'd like the browser to switch to:
http*s*://www.mywebsite.com/
The same goes for the http://mywebsite.com/ - https://mywebsite.com
This is the following code I've been using and I've experienced some odd things so if anyone could provide me with information if this is the right way to do it, or if you have a better way, please provide it. Thanks in advance.
RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^(.*)$ https://www.ebaillv.com/$1 [R=301,L]
I have apf installed on a OpenVZ container (proxmox 2.1). The config is pretty much vanilla and things are working. My external services like ssh and http are working. My problem is that all outbound traffic on http/https is blocked. How do I allow all outbound traffic for http/https.
If I change EGF to 1 like this, all inbound and outbound traffic gets blocked
EGF="1"
EG_TCP_CPORTS="21,25,80,443,43,53"
EG_UDP_CPORTS="20,21,53"
EG_ICMP_TYPES="all"
I opened a single outbound rule with the following
# /usr/local/sbin/apf -a downloads.wordpress.org
How do I allow all outbound traffic on http/https without blocking all traffic?
Why would I allow all inbound ssh/http traffic and block all outbound traffic?
I was working on calling the Search Server 2008 Express search webservice from Powershell. I kept getting <ResponsePacket xmlns="urn:Microsoft.Search.Response"><Response domain=""><Status>ERROR_NO_RESPONSE</Status><DebugErrorMessage>The search request was unable to connect to the Search Service.</DebugErrorMessage></Response></ResponsePacket>I checked the user authorization, the webservice search status, even the WSDL. Turns out the URL for the SearchServer2008 search webservice was incorrect. I was calling $URI= "http://ss2008/_vti_bin/spsearch.asmx?WSDL"and it should have been$URI= "http://ss2008/_vti_bin/search.asmx?WSDL"Here is my sample powershell script:# WSS Documentation http://msdn.microsoft.com/en-us/library/bb862916.aspx$error.clear()#Bad SearchServer2008Express Search URL $URI= "http://ss2008/_vti_bin/spsearch.asmx?WSDL"#Good SearchServer2008Express Search URL $URI= "http://ss2008/_vti_bin/search.asmx?WSDL"$search = New-WebServiceProxy -uri $URI -namespace WSS -class Search -UseDefaultCredential $queryXml = "<QueryPacket Revision='1000'> <Query > <SupportedFormats> <Format revision='1'>urn:Microsoft.Search.Response.Document.Document</Format> </SupportedFormats> <Context> <QueryText language='en-US' type='MSSQLFT'>SELECT Title, Path, Description, Write, Rank, Size FROM Scope() WHERE CONTAINS('Microsoft')</QueryText> <!--<QueryText language='en-US' type='TEXT'>Microsoft</QueryText> --> </Context> </Query></QueryPacket>" $statusResponse = $search.Status()write-host '$statusResponse:' $statusResponse $GetPortalSearchInfo = $search.GetPortalSearchInfo()write-host '$GetPortalSearchInfo:' $GetPortalSearchInfo $queryResult = $search.Query($queryXml)write-host '$queryResult:' $queryResult
Example other link relationships
<head>
<link rel='index' title='Main Title' href='http://domain.com/' />
<link rel='start' title='Part Three' href='http://domain.com/part-3/' />
<link rel='prev' title='Part Two' href='http://domain.com/part-2/' />
<link rel='next' title='Part Four' href='http://domain.com/part-4/' />
</head>
Questions
Have a big impact to make my site get a nice rank to Search Engine?
So I have a web hotel with 1 main website
http://www.myrootsite.com/
and a few websites in subdirectories, in a folder called projects.
I have domain names pointing to the subdirectories, but when holding the mouse over a link in those websites the URLs are shown as:
http://www.myrootsite.com/projects/mysubsite/contact.html
When I'm on mysubsite.com I want them to be shown as:
http://www.mysubsite.com/contact.html
I spoke to support for the web hotel and the guy said try using .htaccess, but I'm not sure exactly how to do this.
Thank you very much for your time!
Edit: For more information
My website is: http://www.example1.com/ and I also own http://www.example2.com/.
All of example2.com's files are in: example1.com/projects/example2/.
When you visit example2.com, you'll notice all of the URL's point towards:
example1.com/projects/example2/
but I want them to point towards:
example2.com/
Can this be done? I hope this is enough info for you to go on :).
Edit: For w3d
I go to the url mysubsite.com and the browser shows the url mysubsite.com. The services I'm using create an iframe around myrootsite.com and use the url mysubsite.com
I just hate that in Firefox and Internet Explorer, holding the mouse over link show that the destination url is: myrootsite.com/projects/mysubsite/...
I just replaced my old router using server with Ubuntu. Everything's fine except DHCP. When I tried connecting iPhone - it works: http://pastebin.com/NNEeiRLY but unfortunately some of my devices can't get IP from server, e.g. my computer: http://pastebin.com/N6LnsEWC
Here's my isc configuration: http://pastebin.com/N5KQnhZV
I've also tried running DHCP server as root (because of some permission denied in logs on lease file).
What can I do?
I have modified this countdown script to countdown to 4:20pm everyday. I have attempted to create a Google Chrome app that displays the countdown. The javascript is supposed replace a paragraph tag with id of "note" with the time left. It works when I load the page in chrome, but does not work when I load the extension. Example, if I put:
<p id="note">asdf</a>
I get just the text, "asdf", but when I open the html file I get the countdown.
Here is the manifest.json file:
{
"name": "My First Extension",
"version": "1.0",
"manifest_version": 2,
"description": "The first extension that I made.",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
}
}
Here is the popup.html code:
<html>
<head>
<title>4:20PM Countdown</title>
<!-- Our CSS stylesheet file -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" />
<link rel="stylesheet" href="http://treesmoke.com/cd/assets/css/styles.css" />
<link rel="stylesheet" href="http://treesmoke.com/cd/assets/countdown/jquery.countdown.css" />
</head>
<body>
<p id="note">asdf</p>
<!-- JavaScript includes -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://treesmoke.com/cd/assets/countdown/jquery.countdown.js"></script>
<script type="text/javascript" src="http://treesmoke.com/cd/assets/js/script.js"></script>
</body>
</html>
Here's the popup.html page, showing that the script works.
Thanks guys, it isn't that big of a deal if I can't get it to work. I was just bored and decided to learn a little.
When you just use IE, Firefox or Chrome it can be easy to forget that HTTP is about more then just going to check the latest tech news at Engadget. It is a full and rich protocol, and a great way to experience that richness is the powerful command line utility cURL. cURL has a lot of options, but the syntax starts out simple. You can retrieve the contents of a web page with a simple curl http://blogs.claritycon.com/. The results should be the full text of the web page, tags and all. From there, you can use X to specify the HTTP verb to use, POST, PUT, DELETE, PATCH, etc and d to specify the payload of a POST or PUT. I have found cURL to be incredibly useful for two scenarios. First, as a good way to test basic web services. Second, while working a bit with CouchDB and another document based database, cURL has helped me learn more about RESTful APIs, including different verbs and response codes. cURL is a mainstay in our environments and programming languages precisely because it is simple, powerful and discoverable. I encourage more .NET developers to take a look, bask on the command line for a while and enjoy the plain text of the web. And this excellent logo: -- Relevant Links -- Its not always the case with manuals, but the manual for cURL is quite useful: http://curl.haxx.se/docs/manual.html To make your command line look a little nicer (and more powerful) on Windows, check out Console and add some transparency effects: http://sourceforge.net/projects/console/Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
As some people might know, adding share buttons from Facebook and Twitter can cause a page to slow down. I've seen many sites pass on the common iframe implementations that these sites offer and simply create icons that link to a sharer url for better control of page performance.
http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.cnn.com%2F&t=CNN%26s+website%27
However, I've also read that Facebook is dropping support for these links. For example, this link now redirects to the Like Button. http://www.facebook.com/facebook-widgets/share.php
Here is an article noting that Facebook is deprecating/has deprecated it's share functionality and is sticking with the Like button. http://www.barbariangroup.com/posts/7544-the_facebook_share_button_has_been_deprecated_called_it
I'm assuming this is the same for the sharing url.
If the sharer url is no longer a reliable option, what other methods are there besides using 3rd party widgets (like Addthis)?
Our current IIS setup as two applications running on different paths at (for example) http://server/sub-a and http://server/sub-b. I want to alias http://server/sub-a as root so that just going to http://server/ will bring up the contents of sub-a. The problem I face is that when I initially set up a ReverseProxy it negatively affected http://server/sub-b. I know this is a fairly common problem- how have you solved it? 99.9% of my experience is with Apache, so I feel a tad lost in the GUI world of IIS.
When i clicked check this error message came up. But it does not come up when update manager strarts automatically. When you open update manager this error comes up. Any ideas on how to fix it?
Details:
*W:GPG error: (http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FC8CA6FE7B1FEC7C, W:Failed to fetch (http://ppa.launchpad.net/jonabeck/ppa/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found
, W:Failed to fetch (http://ppa.launchpad.net/jonabeck/ppa/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found
, W:Failed to fetch (http://ppa.launchpad.net/jonabeck/ppa/ubuntu/dists/precide/main/source/Sources 404 Not Found
, E:Some index files failed to download. They have been ignored, or old ones used instead.*
Hi all members
I have a programme generator code for c#
It gen by 3tier and include MS SQL to Linq, MS SQL, and
Access.
You can use it and give idia to I can do it better.
Links down is below:
http://depositfiles.com/files/38hcd9xf8
ho?c
http://www.easy-share.com/1910377507/Ge
... artent.rarThanks you for using it!
record include example and Guide you can down in page
dofactory.com
or Links below:
http://www.easy-share.com/1910377763/Guide
Do Patterns In Action 3.5.pdf
http://depo...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I get some error messages as soon as I try to install or update packages :
...
W: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/i18n/Translation-en_US Something wicked happened resolving 'fr.archive.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/i18n/Translation-en Something wicked happened resolving 'fr.archive.ubuntu.com:http' (-5 - No address associated with hostname)
E: Some index files failed to download. They have been ignored, or old ones used instead.
...
I tried to find something by googling but I didn't find any satisfactory response. Anybody has an idea ?
I want to block in elinks the yahoo sites(www.yahoo.com and all his subdomains fr.yahoo.com etc). I tried with squid(squid.conf):
acl Badsites dstdomain .yahoo.com
http_acces deny Badsites
and i wrote in elinks.conf:
set.protocol.http.proxy.host = "proxy.host:3128"
set.protocol.http.proxy.user = ""
set.protocol.http.proxy.passwd = ""
and it dosent work. it tells me Host not found on every site i whant to enter.
DO you have any idee why it works that way and can you tell me a solution?
There is a number of things going on this coming weekend, so this maybe pushing it … yet good to put it out there. June 2nd (tomorrow), presenting at SharePoint Saturday St. Louis. The topic is SQL Server Health in a SharePoint environment. http://www.sharepointsaturday.org/stlouis/default.aspx I will be presenting the same topic at a joint session of the PASS group and SharePoint User Group in Evansville on July 17, 2012. http://evansville.sqlpass.org/ http://evansville.sharepointspace.com/default.aspx And then, July 28th I will be presenting at SharePoint Saturday New York City. The topic is Letting the Cards Speak: Agile Planning for SharePoint. http://www.sharepointsaturday.org/ny/default.aspx
EZ System, éditeur du gestionnaire de contenu EZ Publish vient de publier une série de trois patchs de sécurité.
[IMG]http://djug.developpez.com/rsc/Ez-publish-Logo_medium.gif[/IMG]
ces patchs concernent des failles affectant les versions 4.1 et 4.2 du CMS, il est vivement recommandé d'appliquer ce patch.
-> Les patchs se trouvent ici http://ez.no/developer/security/secu...y_in_ez_search
-> Communiqué officiel http://share.ez.no/blogs/ez/security...lish-instances...
Is there a way to redirect a sub folder to no-www?
What I use is:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
but this only redirects the www.example.com to example.com.
I would like to redirect:
www.example.com/home/ to example.com/home/
www.example.com/home/whatever URL to example.com/home/whatever URL.
I have tried this:
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteRule ^$ http://example.com [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/home/ [NC]
RewriteRule ^(.+)$ http://example.com/$1 [R=301,L]
This does not work, either. I can't really figure it out. Any help appreciated!
ANSWER
I figured it out and I will post it for others to see, if having the same issue.
In the sub folder directory's .htaccess used the following:
RewriteCond %{HTTP_HOST} ^(www\.example\.com)?$
RewriteRule ^(.*)$ http://example.com/subfoldername/$1 [R=301,L]
I have this at the end of my /etc/apt/sources.list to retrieve Oracle code:
deb http://oss.oracle.com/debian unstable main non-free
When I run sudo apt-get update, the app gets stuck displaying this message:
100% [Waiting for headers]
If I remove this, apt-get update runs without error.
Is there a new, recommended URL for Oracle products and, generally, how do you fix this problem?
I am pretty sure this did not happen on 11.10 and has only started with the move to 12.04.
I have seen these answers and they do not help:
apt-get update stuck on "Waiting for Headers"
http://ubuntuforums.org/showthread.php?t=1689579
http://muffinresearch.co.uk/archives/2010/03/30/linux-fix-for-apt-get-update-waiting-for-headers/
http://www.kubuntuforums.net/showthread.php?57567-Ubuntu-problems-on-update
There's actually 2 questions.
One is, how do I make RewriteCond+RewriteRule change domain2/folder1 to domain1/folder1
Actually what I want is any domain that tries to access folder1 that is not domain1 gets switched to domain1. So for example domain2.com/domain1/foo - domain1.com/domain1/foo as well as domain3.com/domain1/foo - domain1.com/domain1/foo
This is what I tried
RewriteCond %{HTTP_HOST} !^domain1\.com$ [NC]
RewriteCond %{REQUEST_URI} ^/folder1/
RewriteRule ^/folder1/(.*)$ http://domain1.com/folder1/$1 [L,R=permanent]
But that doesn't work. Next I tried some a simpler rule to see if I could narrow down the issue.
RewriteCond ${HTTP_HOST} domain2\.com [NC]
RewriteRule ^(.*)$ http://google.com/ [L]
I though that would make ANY request to domain2.com go to google.com so I tried http://domain2.com/foo but I get domain2.com/foo not google.com If I go to http://domain2.com I get google. Why don't I get there if I go to http://domain2.com/foo?
What am I not understanding about mod_rewrite?
The Super User question "Playing mp3 in quodlibet displays “GStreamer output pipeline could not be initialized” error" is indexed under two URLs in Google:
http://superuser.com/questions/651591/playing-mp3-in-quodlibet-displays-gstreamer-output-pipeline-could-not-be-initia
http://superuser.com/questions/651591/playing-mp3-in-quodlibet-displays-gstreamer-output-pipeline-could-not-be-initia/652058
The first one is the canonical one; the corresponding rel-canonical is included in both pages:
<link rel="canonical" href="http://superuser.com/questions/651591/playing-mp3-in-quodlibet-displays-gstreamer-output-pipeline-could-not-be-initia" />
Google also indexed http://superuser.com/a/652058, which redirects to the answer:
http://superuser.com/questions/651591/playing-mp3-in-quodlibet-displays-gstreamer-output-pipeline-could-not-be-initia/652058#652058
Now, the second URL from above is the same as this one minus the fragment #652058.
So Google seems to strip the fragment, which results in exactly the same page under another URL (= containing the answer ID /652058 as suffix), and indexes it, too -- despite rel-canonical and duplicate content.
Shouldn’t Google recognize this and only index the canonical variant?
And what could be the reason why Stack Exchange includes the answer ID in the URL path, and not only in the fragment (resulting in various URL variants for the same page)?
I have front end rails app, that reverse proxies to any of a number of backend rails apps depending on URL, for example
http://www.my_host.com/app_one reverse proxies to http://www.remote_host_running_app_one.com
such that a URL like http://www.my_host.com/app_one/users will display the contents of http://www.remote_host_running_app_one.com/users
I have a large, and ever expanding number of backends, so they can not be explicitly listed anywhere other than a database. This is no problem for mod_rewrite using a prg:/ rewrite map reverse proxy.
The question is, the urls returned by rails helpers have the form /controller/action making them absolute to the root. This is a problem for the page served by mod_rewrite because links on the proxied page appear as absolute to the domain. i.e.:
http://www.my_host.com/app_one/controller/action has links that end up looking like /controller/action/ when they need to look like /app_one/controller/action
mod_proxy_html seems like the right idea, but it doesn't seem to be as dynamic as I would need, since the rules need to be hard coded into the config files.
Is there a way to fix this server-side, so that the links will be routed correctly?
I want to tell if we are running in 32 bit or 64 bit mode. thanks dave david@at at [email protected] Windward Reports http://www.WindwardReports.com me http://dave.thielen.com Cubicle Wars http://www.windwardreports.com/film.htm