(adsbygoogle = window.adsbygoogle || []).push({}); O_o :: 'Computer/Network' 카테고리의 글 목록

'Computer/Network'에 해당되는 글 15건

  1. 2009.03.12 Creating a Self-Signed SSL Certificate without a mess of makecert.exe (using SSL Diagnostics Tool)
  2. 2008.11.17 IIS 4G보다 큰 파일 다운로드 안될때
  3. 2008.11.05 Remote Access VPN Connections
  4. 2008.10.21 Google 등록 뉴스 사이트맵 작성
  5. 2008.10.21 Google 등록 사이트맵 작성 요령
  6. 2008.10.21 Google 등록 웹마스터 가이드라인
  7. 2008.10.15 Open SSL Link
  8. 2008.10.15 Amazone Web Service (S3) Download Test Ref
  9. 2008.10.13 ReWrite Module for Microsoft Internet Information Server
  10. 2008.10.08 URL Rewriting Guide

Creating a Self-Signed SSL Certificate without a mess of makecert.exe (using SSL Diagnostics Tool)

|
Creating a Self-Signed SSL Certificate without a mess of makecert.exe (using SSL Diagnostics Tool)

Introduction:
So you have a server and you need to implement SSL to allow secure (https) communication. What choices do you have? You can buy a certificate from certification authority or you can issue a Self-Signed certificate to yourself. The difference is that your browser "knows" it can trust the certificates from the authorities (it has it installed). But when the browser encounters the https connection with a server with the self-signed certificate, the user is presented with a message like this:

Thus, self-signed certificates are OK for test and development web sites, but generally not OK for public websites.
This article will show you the simplest ways to create a Self-Signed SSL Certificate.

Here are your options. (Or just go to the Best Solution )

Solution 1 (quite long, but recommended by Microsoft)
Setting Up SSL Using IIS and Certificate Server

MS recommends that you get the certificate from the certificate server. This means that you have to have an access to Window 2000 or Windows 2003 server with "Certification Services" installed. You use IIS MMC to generate request to this server. Then using browser you submit this request to the server. Then, when somebody at that server approves the request, you will get back a certificate.
See details at http://support.microsoft.com/default.aspx?kbid=299525

Solution 2 (fast, but sometimes could be tricky)
Creating Self-Signed SSL Certificates using makecert.exe It is a quite simple solution. The only problem is that sometimes it just doesn't work, and it's hard to determine what is wrong. The makecert.exe comes with VS.NET. It you don't have .NET Framework 1.1 installed, the makecert might be outdated. You can download a newer version from http://download.microsoft.com/download/platformsdk/Update/5.131.3617.0/NT45XP/EN-US/makecert.exe
Just replace yourservername with the computer name of your PC and run:
makecert -r -pe -n "CN=yourservername" -b 01/01/2000 -e 01/01/2050 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

Then go to the IIS "Web Site Properties", "Directory Security", "Server Certificate...", "Assign an existing certificate" and select the new certificate from the list.
It works? Fine! No? Go to the Best Solution

Solution 3 (OK for not-technical users)
Download a test certificate from certification authorities The certificate companies like VeriSign and Thawte issue test certificates, but they expire after 90 days or so, and the process of getting it could be quite tedious.

Solution 4 (The Best and Recommended)
Create a Self-Signed Certificate using SSL Diagnostics Tool

Avoid all this pain with a nice tool from Microsoft: SSL Diagnostics . Download setup.exe (2112 KB) from here: http://www.microsoft.com/downloads/details.aspx?familyid=CABEA1D0-5A10-41BC-83D4-06C814265282&displaylang=en

Install it and run. In the main window of SSL Diagnostics, right-click the Web site level (shown by [W3SVC/<site number>]), and then click Create New Certificate.


That is it. You are done. Don't forget to explore other capabilities of this nice tool.

And

IIS 4G보다 큰 파일 다운로드 안될때

|

증상

  • Web 상에서 4G 이상의 화일을 다운로드 할때 3.99G 까지만 다운되다가 더이상 안받아짐.
  • dvd의 iso 들 4G 넘는 용량인경우 발생

원인

  • ms의 internet explorer의 모든 버전은 원래 4G이상은 다운로드가 안된다

     

해결

  • firefox를 사용한다.

     

And

Remote Access VPN Connections

|

Remote AccessVPN Connections

For remote access VPN connections, a computer creates a remote access connection to a VPN server. During the connection process the VPN server assigns an IP address for the remote access VPN client and changes the default route on the remote client so that default route traffic is sent over the virtual interface.

IPAddresses and the Dial-Up VPN Client

For dial-up VPN clients who connect to the Internet before creating a VPN connection with a VPN server on the Internet, two IP addresses are allocated:

?

When creating the PPP connection, IPCP negotiation with the ISP NAS assigns a public IP address.

?

When creating the VPN connection, IPCP negotiation with the VPN server assigns an intranet IP address. The IP address allocated by the VPN server can be a public IP address or private IP address, depending on whether your organization is implementing public or private addressing on its intranet.

In either case, the IP address allocated to the VPN client must be reachable by hosts on the intranet and vice versa. The VPN server must have appropriate entries in its routing table to reach all the hosts on the intranet and the routers of the intranet must have the appropriate entries in their routing tables to reach the VPN clients.

The tunneled data sent through the VPN is addressed from the VPN client's VPN server-allocated address to an intranet address. The outer IP header is addressed between the ISP-allocated IP address of the VPN client and the public address of the VPN server. Because the routers on the Internet only process the outer IP header, the Internet routers forward the tunneled data to the VPN server's public IP address.

An example of dial-up client addressing is shown in Figure 9.14 where the organization uses private addresses on the intranet, and the tunneled data is an IP datagram.

Figure 9.14 Public and Private Addresses in PPTP Tunneled Data

DefaultRoutes and Dial-Up Clients

When a typical dial-up client dials the ISP, it receives a public IP address from the ISP NAS. A default gateway address is not allocated as part of the IPCP negotiation process. Therefore, in order to reach all Internet addresses, the dial-up client adds a default route to its routing table using the dial-up interface connected to the ISP. As a result, the client can forward the IP datagrams to the ISP NAS from where they are routed to its Internet location.

For dial-up clients with no other TCP/IP interfaces, this is the wanted behavior. However, this behavior can cause confusion for dial-up clients that have an existing LAN-based connection to an intranet. In this scenario, a default route already exists pointing to the local intranet router. When the dial-up client creates a connection with their ISP, the original default route remains in the routing table but is changed to have a higher metric. A new default route is added with a lower metric using the ISP connection.

As a result, the intranet locations that are not on the dial-up client's directly attached network are not reachable for the duration of the connection to the ISP. If the new default route is not created, all intranet locations are reachable, but Internet locations are not.

A Windows 2000?based dial-up client creates the default route by default.

To prevent the default route from being created

?

In the properties of the TCP/IP protocol of the dial-up connection object, in the Advanced TCP/IP Settings dialog box, click the General tab, and then clear the Use default gateway on remote network check box.

To achieve connectivity to both intranet and Internet locations while the ISP connection is active, leave the Use default gateway on remote network option selected and add the routes of the intranet to the routing table of the dial-up client. The intranet routes can be added through static persistent routes using the route utility, or, if Routing Information Protocol (RIP) version 1 is being used as the intranet routing protocol, you can use the Route Listening Service to listen to RIP version 1 routing protocol traffic and dynamically add intranet routes. When connected to the ISP, all intranet locations are reachable using the intranet routes and all Internet locations are reachable using the default route.

Default Routes and VPNs over the Internet

When the dial-up client calls the ISP, it adds a default route using the connection to the ISP as shown in Figure 9.15. At this point, it can reach all Internet addresses through the router at the ISP NAS.

Figure 9.15 Default Route Created When Dialing an ISP

When the VPN client creates the VPN connection, another default route and a host route to the IP address of the tunnel server are added, as illustrated in Figure 9.16. The previous default route is saved but now has a higher metric. Adding the new default route means that all Internet locations except the IP address of the tunnel server are not reachable for the duration of the VPN connection.

Figure 9.16 Default Route Created When Initiating the VPN

Just as in the case of a dial-up client connecting to the Internet, when a dial-up VPN client using voluntary tunneling creates a VPN connection to a private intranet across the Internet, one of the following occurs:

?

Internet locations are reachable and intranet locations are not reachable when the VPN connection is not active.

?

Intranet locations are reachable and Internet locations are not reachable when the VPN connection is active.

For most Internet-connected VPN clients, this behavior does not represent a problem because they are typically engaged in either intranet or Internet communication, not both.

For VPN clients who want concurrent access to intranet and Internet resources when the VPN is connected, the solution depends on the nature of the IP addressing in the intranet. In all cases, configure the VPN connection object so that it does not add a default gateway. When the VPN connection is created, the default route remains pointed to the ISP NAS, allowing access to all Internet addresses.

Based on the type of intranet addressing you use, enable concurrent access to intranet and Internet resources as follows:

Public Addresses    Add static persistent routes for the public network IDs of the intranet using the IP address of the VPN server's virtual interface as the gateway IP address.

Private Addresses    Add static persistent routes for the private network IDs of the intranet using the IP address of the VPN server's virtual interface as the gateway IP address.

Overlapping or Illegal Addresses    If the intranet is using overlapping or illegal addresses (IP network IDs that are not private and have not been registered by Internet Network Information Center [InterNIC] or obtained from an ISP), those IP addresses might be duplicated by public addresses on the Internet. If static persistent routes are added on the VPN client for the overlapping network IDs of the intranet, the locations on the Internet for the overlapping addresses are not reachable.

In each of these cases, static persistent routes for the network IDs of the intranet need to be added to the VPN client. When the persistent routes are added, they are saved in the registry. With Windows NT 4.0 Service Pack 3 and later and with Windows 2000, the persistent routes are not actually added to the IP routing table (and are not visible with the route print command at the Windows 2000 command prompt) until the IP address of the gateway is reachable. The IP address of the gateway becomes reachable when the VPN connection is made.

For each route, type the following route utility syntax at a Windows 2000 command prompt:

ROUTE ADD <Intranet Network ID> MASK <NetMask> <IP address of VPN server's virtual interface> -p

The gateway IP address in the route commands for each intranet route is the IP address assigned to the VPN server's virtual interface, not the IP address of the VPN server's Internet interface.

You can determine the IP address of the VPN server's virtual interface from the IP address of the Internal interface under IP Routing - General in the Routing and Remote Access snap-in. If you use DHCP to obtain IP addresses for dial-up networking and VPN clients, the IP address of the VPN server's virtual interface is the first IP address obtained when requesting DHCP addresses. If you have configured a static IP address pool, the IP address of the VPN server's virtual interface is the first IP address in the static IP address pool. You can also determine the IP address of the VPN server's virtual interface by double-clicking the virtual private networking connection object when the VPN connection is active. In the resulting Status dialog box, click the Details tab.

caution-icon

Caution

For all of these cases, you must add the routes very carefully to ensure that the private traffic to the intranet is forwarded using the VPN connection and not the PPP connection to the ISP. If the wrong routes are added, the traffic that you intend to forward across the VPN in an encrypted form is instead sent unencrypted across the Internet. For example, if your intranet is using the public network ID 207.46.130.0/24 (subnet mask 255.255.255.0), and you mistakenly add a persistent static route for 207.46.131.0/24, all traffic to the intranet network 207.46.130.0/24 is forwarded across the Internet in plaintext, rather than being encrypted and sent across the VPN connection.

Source : MS TechNet

And

Google 등록 뉴스 사이트맵 작성

|

뉴스 Sitemap 만들기

시작하기 전에 사이트가 Google 뉴스에 포함되어 있는지 확인합니다. 포함되어 있지 않으면 Google 뉴스에 포함되도록 요청할 수 있습니다.

뉴스 Sitemap에서는 아래와 같이 다양한 형식의 Sitemap 프로토콜을 사용합니다.

네임스페이스/urlset 태그
  • 뉴스 스키마에 대한 두 번째 네임스페이스를 다음과 같이 추가해야 합니다.
    http://www.google.com/schemas/sitemap-news/0.9
    뉴스 Sitemap에 대한 urlset 태그는 다음과 같습니다.
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"    xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
URL 목록
  • 각 URL은 아래 표에 설명된 뉴스별 태그(선택사항)를 뉴스 스키마 내에 포함시킬 수 있습니다. 모든 태그가 사용된 URL의 예는 다음과 같습니다.
    <url>
    <loc>http://mynewssite.com/article123.html</loc>
    <news:news>
    <news:publication_date>2006-08-14T03:30:00Z</news:publication_date>
    <news:keywords>비즈니스, 인수, 합병s</news:keywords>
    </news:news>
    </url>

    <loc> 태그는 기사 페이지의 URL이어야 합니다.

    뉴스별 태그 정의

    태그 필수 여부 설명
    <publication_date>
    W3C 형식의 기사 발행일로, 시간 정보를 포함할 것을 권장합니다. Sitemap 파일에 기사 발행일 태그를 포함시키지 않을 경우에는 해당 페이지 자체에 발췌할 수 있는 날짜가 포함되어야 합니다. Google 뉴스에서 해당 기사의 발행일을 정확하게 알아야 하기 때문입니다. Sitemap 파일에 기사의 날짜가 없고 기사 자체에도 발췌 가능한 날짜가 없으면 해당 기사는 Google 뉴스에 게재되지 않으며 웹마스터 도구에 있는 뉴스 크롤링 오류 페이지의 기사에 "날짜를 찾을 수 없음" 오류가 표시됩니다.
    <keywords>
    선택사항 분리된 키워드 목록은 기사의 내용을 나타냅니다. 키워드는 기존 Google 뉴스 카테고리 목록을 포함하여 여러 곳에서 가져올 수 있습니다.
  • 뉴스 Sitemap의 기사는 모두 동일한 게시물 라벨을 가지고 있어야 합니다. 일반적으로 게시물 라벨에 따라 게시물 이름과 언어가 달리 지정됩니다. 예를 들어, 사이트에 The Example Times(영어)Journal Exemplaire(프랑스어)를 게재한다면 각 게시물에 대해 하나씩 총 2개의 게시물 라벨이 있어야 합니다. 사이트에 사용할 수 있는 게시물 라벨은 뉴스 Sitemap을 추가할 때 나타나는 메뉴에서 찾을 수 있습니다. 사이트에 구독 콘텐츠와 비구독 콘텐츠 또는 보도자료와 보도자료가 아닌 콘텐츠가 혼합되어 있는 경우 해당 기사유형에 대한 게시물 라벨이 추가로 표시됩니다. 각 게시물 라벨에 대한 기사를 별도의 Sitemap으로 제출하시기 바랍니다. 필요한 게시물 라벨을 사용할 수 없는 경우 Google 뉴스 지원팀에 문의하여 추가하도록 요청하시기 바랍니다.

  • 뉴스 Sitemap은 URL을 최대 1,000개만 포함할 수 있습니다. 이는 뉴스 Sitemap이 사이트의 최신 뉴스 기사만 포함하도록 하기 위함입니다. 따라서 뉴스 Sitemap을 수시로 업데이트하는 것이 좋습니다. Google 뉴스에서는 뉴스 Sitemap을 계속 검색하여 최신 콘텐츠를 크롤링합니다.

다음은 기사를 하나만 포함하는 뉴스 Sitemap의 예입니다.

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<url>
<loc>http://mynewssite.com/article100.html</loc>
<news:news>
<news:publication_date>2006-08-17T03:19:00Z</news:publication_date>
<news:keywords>스포츠, 야구</news:keywords>
</news:news>
</url>
</urlset>

뉴스 Sitemap을 만든 후 뉴스 기사를 포함하는 최상위 디렉토리에 업로드한 다음 Google 에 제출합니다.

문의사항은 Sitemap 프로토콜 Google 그룹스 토론 포럼을 참조하시기 바랍니다.

And

Google 등록 사이트맵 작성 요령

|

Sitemap이란 무엇인가요?

일반적으로 Sitemap에는 두 가지 유형이 있습니다. 첫 번째 Sitemap 유형은 사이트 페이지가 나열된 HTML 페이지로 섹션별로 구분하는 것이 일반적이며, 사용자가 필요한 정보를 찾을 수 있도록 하기 위한 것입니다.

Sitemap이라고 하는 XML Sitemap으로는 사이트 정보를 Google에 알릴 수 있습니다. 지금부터 이 Sitemap 유형에 대해 살펴보도록 하겠습니다.

XML Sitemap은 간단하게 Sitemap이라고 하며 웹사이트에 포함된 페이지를 나열합니다. Sitemap을 만들어 제출하면 Google의 일반적인 크롤링 과정에서 발견되지 않는 URL까지 포함하여 사이트의 모든 페이지 정보를 Google에 알릴 수 있습니다.

Sitemap이 특히 유용하게 사용되는 경우는 다음과 같습니다.

  • 동적 콘텐츠가 있는 사이트
  • AJAX 또는 Flash 등과 같이 크롤링 과정 동안 Googlebot이 쉽게 검색하지 못하는 페이지가 있는 사이트
  • 연결되는 링크가 많지 않은 새로운 사이트. Googlebot은 페이지간 링크를 통해 웹을 크롤링합니다. 따라서 링크 연결이 잘 되어 있지 않은 사이트의 경우 Googlebot이 쉽게 검색하지 못할 수도 있습니다.
  • 서로 잘 연결되지 않거나 전혀 연결되지 않는 콘텐츠 페이지를 보관하는 대형 보관함이 있는 사이트

또한 Sitemap을 사용하여 페이지에 대한 다음과 같은 추가 정보를 Google에 제공할 수 있습니다.

  • 사이트의 페이지가 변경되는 빈도. 예를 들어, 제품 페이지는 매일 업데이트되지만 내 정보 페이지는 몇 달에 한 번씩 업데이트됩니다.
  • 각 페이지가 최종 수정된 날짜
  • 사이트 페이지 간의 상대적인 중요도. 예를 들어 홈페이지의 상대적인 중요도를 1.0이라고 하면 카테고리 페이지는 0.8, 개별 블로그 항목이나 제품 페이지는 0.5라고 할 수 있습니다. 이 우선순위는 특정 URL과 기타 URL을 비교한 상대적인 중요도만 나타낼 뿐 실제 검색결과에서 페이지의 순위에는 영향을 미치지 않습니다.

Sitemap은 사이트에 대한 추가 정보를 Google에 제공함으로써 일반적인 Google의 웹 크롤링 방식을 보완할 수 있습니다. 이를 통해 사이트에서 더 많은 페이지를 더 짧은 시간에 크롤링할 수 있으나, Sitemap의 URL이 모두 Google 색인에 추가된다고 보장할 수는 없습니다. 하지만 Sitemap 제출로 인해 사이트에 벌점이 부여되는 경우도 없습니다.

Google은 sitemaps.org에서 규정하는 Sitemap Protocol 0.9를 준수합니다. Sitemap 프로토콜은 웹 크롤러와 관련이 있는 Sitemap 정보를 요약하기 위한 XML입니다. 따라서 Sitemap Protocol 0.9를 사용하여 Google용으로 만든 Sitemap은 sitemaps.org의 기준을 채택한 다른 검색엔진과 호환됩니다.

대부분의 사이트는 표준 Sitemap으로 충분하지만 특정 유형의 콘텐츠에 대해서는 특수 Sitemap을 만들어 제출할 수도 있습니다. 이러한 Sitemap 형식은 Google 전용으로 다른 검색엔진에서는 사용할 수 없으며, 특정 콘텐츠 유형에 대한 세부정보를 Google에 제공할 수 있습니다. 예를 들어, 사이트 운영자는 뉴스 Sitemap을 통해 Google 뉴스 검색결과에 게재될 수 있는 정보 즉, 발행일, 키워드 및 주식 종목 기호와 같은 정보를 Google에 제공할 수 있습니다. Sitemap 형식에는 다음과 같은 것이 있습니다.

And

Google 등록 웹마스터 가이드라인

|

웹마스터 가이드라인

다음 가이드라인을 준수하면 Google이 내 웹사이트를 찾아 색인에 포함시키고 순위를 지정하는 데 도움이 됩니다. 해당 가이드라인의 제안사항을 따르지 않는 경우에도 '품질 가이드라인' 섹션은 자세히 읽어보는 것이 좋습니다. 이 섹션에는 Google 색인에서 사이트가 완전히 삭제되거나 벌점이 부여되는 결과를 초래할 수 있는 불법 행위에 대해서도 간략히 설명되어 있습니다. 벌점이 부여된 사이트는 Google.co.kr 또는 Google 파트너 사이트의 검색결과에 더 이상 나타나지 않습니다.

사이트를 Google 검색결과에 추가할 준비가 되었으면 다음 단계를 따르세요.

  • 다른 관련 사이트를 귀하의 사이트에 연결합니다.
  • http://www.google.com/addurl.html에서 사이트를 Google에 제출합니다.
  • Google 웹마스터 도구의 일부로 Sitemap을 제출합니다. Google은 제출된 Sitemap을 사용하여 사이트의 구조를 확인하고 웹페이지를 모두 포함할 수 있도록 Google 검색범위를 확장합니다.
  • 페이지 상태를 알고 있어야 하는 모든 사이트에 귀하의 사이트가 온라인 상태임을 알립니다.
  • 오픈 디렉토리 프로젝트(Open Directory Project)나 Yahoo! 같은 관련 디렉토리뿐 아니라 기타 업종별 전문 사이트에도 사이트를 제출합니다.

디자인 및 콘텐츠 가이드라인

  • 계층 구조와 텍스트 링크가 명확한 사이트를 만듭니다. 모든 페이지는 하나 이상의 정적 텍스트 링크를 통해 도달할 수 있어야 합니다.
  • 사이트의 주요 섹션으로 이어지는 링크를 사이트 맵을 통해 사용자에게 제공합니다. 사이트 맵에 포함된 링크가 100개 이상이면 너무 복잡하므로 별도의 페이지로 나누는 것이 좋습니다.
  • 풍부한 정보를 제공하는 유익한 사이트를 만들고 콘텐츠를 명확하고 정확하게 설명하는 페이지를 작성합니다.
  • 자신의 페이지를 찾기 위해 사용자들이 어떤 단어를 입력할지 생각해 보고 실제로 사이트에 해당 단어를 사용합니다.
  • 이미지가 아닌 텍스트를 사용하여 중요한 이름이나 콘텐츠, 링크를 표시합니다. Google 크롤러는 이미지 안에 포함된 텍스트를 인식하지 못합니다.
  • TITLE 태그와 ALT 속성이 정확하며 해당 내용을 제대로 설명하고 있는지 확인합니다.
  • 깨진 링크가 있는지 확인하고 HTML을 수정합니다.
  • 동적 페이지(예: ? 문자가 포함된 URL)를 사용하는 경우, 일부 검색엔진 스파이더는 동적 페이지는 물론 정적 페이지도 크롤링하지 않을 수 있습니다. 매개변수의 경우 길이는 짧게, 개수는 적게 유지하면 도움이 됩니다.
  • 한 페이지에서 링크 수를 100개 미만으로 적절하게 유지합니다.

기술 가이드라인

  • 대부분의 검색엔진 스파이더가 Lynx와 매우 유사한 방식으로 사이트를 확인하므로 Lynx와 같은 텍스트 브라우저를 사용하여 사이트를 검토하세요. 자바스크립트, 쿠키, 세션 ID, 프레임, DHTML 또는 플래시 같은 고급 기능으로 인해 텍스트 브라우저에 전체 사이트가 표시되지 않으면 검색엔진 스파이더 역시 해당 사이트를 제대로 크롤링하지 못할 수도 있습니다.
  • 세션 ID나 사이트의 경로를 추적하는 인수 없이도 검색봇이 사이트를 크롤링할 수 있도록 허용합니다. 세션 ID나 경로 추적 인수를 사용하는 기술은 개별적인 사용자 동작을 추적할 때는 유용하지만, 봇의 액세스 패턴 면에서는 전혀 그렇지 않습니다. 해당 기술을 사용할 경우 봇은 모양은 다르지만 실제로 같은 페이지로 연결되는 URL을 삭제하지 못하므로 사이트가 색인에 완전히 등록되지 않을 수도 있습니다.
  • 웹서버가 If-Modified-Since HTTP 헤더를 지원하는지 확인합니다. 이 기능을 사용하면 웹서버에서 마지막 사이트 크롤링 후 콘텐츠 변경 여부를 Google에 알려줄 수 있습니다. 이 기능이 지원되면 크롤링에 사용되는 대역폭과 오버헤드가 줄어듭니다.
  • 웹서버에서 robots.txt 파일을 사용합니다. 이 파일은 크롤링할 디렉토리와 크롤링하지 않아야 할 디렉토리를 크롤러에 알려줍니다. 실수로 Googlebot 크롤러를 차단하지 않도록 최신 사이트 정보로 파일을 업데이트하세요. 로봇이 사이트를 방문할 때 로봇에게 지시하는 방법은 http://www.robotstxt.org/wc/faq.html 페이지를 참조하시기 바랍니다. robots.txt 파일을 올바르게 사용하고 있는지 테스트하려면 Google 웹마스터 도구에 있는 robots.txt 분석 도구를 사용하세요.
  • 회사에서 콘텐츠 관리 시스템을 구입한 경우 검색엔진 스파이더가 사이트를 크롤링할 수 있도록 해당 시스템에 콘텐츠를 내보내는 기능이 있어야 합니다.
  • robots.txt를 사용하면 검색결과 페이지 또는 기타 자동생성 페이지 등 검색엔진을 통해 방문하는 사용자에게 기존 페이지와 다른 추가적인 가치가 많지 않은 페이지들이 크롤링되는 것을 막을 수 있습니다.

품질 가이드라인

품질 가이드라인에서는 가장 일반적으로 볼 수 있는 기만 행위나 조작 행위를 설명합니다. 그러나 가이드라인에 나와 있지 않더라도 널리 알려진 웹사이트의 철자를 오기하여 등록함으로써 사용자를 기만하는 행위 등 위반의 소지가 있는 기타 행위 또한 Google의 금지 대상이 될 수 있습니다. 특정 기만 행위가 이 페이지에 나와 있지 않다고 해서 Google이 해당 행위를 허용하는 것으로 가정해서는 안 됩니다. 품질 가이드라인에 설명된 기본 원칙을 준수하기 위해 노력하면 이를 악용하는 사이트보다 사용자에게 보다 만족스러운 서비스를 제공할 수 있으므로 결국 해당 사이트의 게재순위도 높아지게 됩니다.

Google의 품질 가이드라인을 악용하는 것으로 판단되는 사이트가 있으면 https://www.google.com/webmasters/tools/spamreport?hl=ko에 서 해당 사이트를 신고하시기 바랍니다. Google은 스팸 퇴치를 위해 직접 나서기보다는 확장가능하고 자동화된 방법으로 문제를 해결해 나가고자 합니다. 접수되는 스팸 신고사항은 향후 스팸 시도를 파악하고 차단하는 확장가능한 알고리즘을 개발하는 데 사용됩니다.

품질 가이드라인 - 기본 원칙

  • 검색엔진이 아니라 사용자를 위한 페이지를 만듭니다. 사용자를 속이거나, 사용자에게 표시되는 콘텐츠와 다른 콘텐츠를 검색엔진에 제공하면 안 됩니다. 이런 행위를 흔히 '클로킹'이라고 합니다.
  • 검 색엔진 순위를 높이기 위한 변칙적인 행위는 피해야 합니다. 그러려면 경쟁 웹사이트에 대해 자신이 한 행위를 누구에게나 떳떳하게 설명할 수 있어야 합니다. 또한 이 작업이 사용자에게 도움이 되는지, 검색엔진이 없었더라도 같은 작업을 했을지 자신에게 되묻는 것도 유용한 판단 기준이 됩니다.
  • 사이트의 순위나 PageRank를 높이기 위해 만들어진 링크 전략을 사용하지 않습니다. 특히 웹 스패머나 웹 상의 '위험한 사이트'에 대한 링크가 있으면 사이트의 순위가 내려갈 수 있으므로 이러한 링크는 피하는 것이 좋습니다.
  • 페이지 제출, 순위 확인 등을 위해 허가되지 않은 컴퓨터 프로그램을 사용하지 않습니다. 이러한 프로그램을 사용할 경우 대량의 컴퓨팅 리소스가 소비될 뿐 아니라 Google 서비스 약관에도 위배됩니다. 자동 또는 프로그래밍 방식 검색어를 Google에 보내는 WebPosition Gold™ 같은 제품은 사용하지 않는 것이 좋습니다.

품질 가이드라인 - 세부사항

사이트가 본 가이드라인에 부합하지 않는 것으로 판단되면 가이드라인에 부합하도록 사이트를 수정하고 사이트 재검토 요청을 제출하시기 바랍니다.

And

Open SSL Link

|

Tarballs

Here you can find all distribution tarballs (and sometimes corresponding patches) of the various OpenSSL release versions. Alternatively you can also download them via FTP from the OpenSSL FTP area under ftp://ftp.openssl.org/source/. Tarballs containing a snapshot of the latest development version can be found under ftp://ftp.openssl.org/snapshot/.
   Bytes      Timestamp       Filename
________ ____________________ ____________________________
 3459643 Sep 15 16:35:55 2008 openssl-0.9.8i.tar.gz (MD5) (SHA1) (PGP sign)  [LATEST]
 3439981 May 28 09:58:46 2008 openssl-0.9.8h.tar.gz (MD5) (SHA1) (PGP sign)
 3269831 Dec  1 00:25:33 2007 openssl-fips-1.1.2.tar.gz (MD5) (SHA1) (PGP sign)
 3354792 Oct 19 10:36:16 2007 openssl-0.9.8g.tar.gz (MD5) (SHA1) (PGP sign)
 3357445 Oct 11 20:31:40 2007 openssl-0.9.8f.tar.gz (MD5) (SHA1) (PGP sign)
 3341665 Feb 23 13:58:19 2007 openssl-0.9.8e.tar.gz (MD5) (SHA1) (PGP sign)
 3303943 Feb 23 13:57:08 2007 openssl-0.9.7m.tar.gz (MD5) (SHA1) (PGP sign)
 3315566 Sep 28 14:09:22 2006 openssl-0.9.8d.tar.gz (MD5) (SHA1) (PGP sign)
 3294357 Sep 28 14:08:07 2006 openssl-0.9.7l.tar.gz (MD5) (SHA1) (PGP sign)
 3313857 Sep  5 11:04:33 2006 openssl-0.9.8c.tar.gz (MD5) (SHA1) (PGP sign)
 3292692 Sep  5 11:04:30 2006 openssl-0.9.7k.tar.gz (MD5) (SHA1) (PGP sign)
 3279283 May  4 15:21:31 2006 openssl-0.9.8b.tar.gz (MD5) (SHA1) (PGP sign)
 3290510 May  4 15:21:16 2006 openssl-0.9.7j.tar.gz (MD5) (SHA1) (PGP sign)
 3280907 Oct 15 00:37:24 2005 openssl-0.9.7i.tar.gz (MD5) (SHA1) (PGP sign)
 3271435 Oct 11 12:37:49 2005 openssl-0.9.8a.tar.gz (MD5) (SHA1) (PGP sign)
 3287019 Oct 11 12:36:35 2005 openssl-0.9.7h.tar.gz (MD5) (SHA1) (PGP sign)
 3259550 Jul  5 21:19:24 2005 openssl-0.9.8.tar.gz (MD5) (SHA1) (PGP sign)
 3132217 Apr 11 17:21:51 2005 openssl-0.9.7g.tar.gz (MD5) (SHA1) (PGP sign)
 3104957 Mar 22 20:23:13 2005 openssl-0.9.7f.tar.gz (MD5) (PGP sign)
 3043231 Oct 25 13:44:48 2004 openssl-0.9.7e.tar.gz (MD5) (PGP sign)
 2257721 Mar 17 13:14:47 2004 openssl-engine-0.9.6m.tar.gz (MD5) (PGP sign)
 2798433 Mar 17 13:13:26 2004 openssl-0.9.7d.tar.gz (MD5) (PGP sign)
 2184918 Mar 17 13:11:47 2004 openssl-0.9.6m.tar.gz (MD5) (PGP sign)
 2255800 Nov  4 12:53:07 2003 openssl-engine-0.9.6l.tar.gz (MD5) (PGP sign)
 2183726 Nov  4 12:53:03 2003 openssl-0.9.6l.tar.gz (MD5) (PGP sign)
 2183608 Sep 30 14:50:16 2003 openssl-0.9.6k.tar.gz (MD5) (PGP sign)
 2791797 Sep 30 14:50:15 2003 openssl-0.9.7c.tar.gz (MD5) (PGP sign)
 2255114 Sep 30 14:50:15 2003 openssl-engine-0.9.6k.tar.gz (MD5) (PGP sign)
 2256059 Aug 25 05:32:06 2003 openssl-engine-0.9.6j.tar.gz (MD5) (PGP sign)
 2182643 Apr 10 23:00:35 2003 openssl-0.9.6j.tar.gz (MD5) (PGP sign)
 2784331 Apr 10 23:00:32 2003 openssl-0.9.7b.tar.gz (MD5) (PGP sign)
 2776582 Feb 19 14:12:20 2003 openssl-0.9.7a.tar.gz (MD5) (PGP sign)
 2252898 Feb 19 14:11:43 2003 openssl-engine-0.9.6i.tar.gz (MD5) (PGP sign)
 2179559 Feb 19 14:11:08 2003 openssl-0.9.6i.tar.gz (MD5) (PGP sign)
 2768454 Dec 31 01:06:14 2002 openssl-0.9.7.tar.gz (MD5) (PGP sign)
 2178314 Dec  8 21:43:23 2002 openssl-0.9.6h.tar.gz (MD5) (PGP sign)
 2252693 Dec  6 00:26:04 2002 openssl-engine-0.9.6h.tar.gz (MD5) (PGP sign)
 2245485 Aug  9 13:59:29 2002 openssl-engine-0.9.6g.tar.gz (MD5) (PGP sign)
 2170570 Aug  9 13:54:01 2002 openssl-0.9.6g.tar.gz (MD5) (PGP sign)
 2244243 Aug  9 00:03:32 2002 openssl-engine-0.9.6f.tar.gz (MD5) (PGP sign)
 2170178 Aug  8 23:25:32 2002 openssl-0.9.6f.tar.gz (MD5) (PGP sign)
 2232012 Jul 30 13:16:45 2002 openssl-engine-0.9.6e.tar.gz (MD5) (PGP sign)
 2158566 Jul 30 13:07:56 2002 openssl-0.9.6e.tar.gz (MD5) (PGP sign)
 2236143 May 10 01:31:40 2002 openssl-engine-0.9.6d.tar.gz (MD5) (PGP sign)
 2162736 May 10 01:15:14 2002 openssl-0.9.6d.tar.gz (MD5) (PGP sign)
 2256937 Dec 21 04:09:50 2001 openssl-engine-0.9.6c.tar.gz (MD5) (PGP sign)
 2151178 Dec 21 04:07:11 2001 openssl-0.9.6c.tar.gz (MD5) (PGP sign)
 2146444 Jul  9 18:39:51 2001 openssl-engine-0.9.6b.tar.gz (MD5) (PGP sign)
 2132220 Jul  9 18:34:53 2001 openssl-0.9.6b.tar.gz (MD5) (PGP sign)
 2185324 Apr  5 23:30:28 2001 openssl-engine-0.9.6a.tar.gz (MD5) (PGP sign)
 2133646 Apr  5 23:00:37 2001 openssl-0.9.6a.tar.gz (MD5) (PGP sign)
 2103482 Sep 24 18:22:33 2000 openssl-engine-0.9.6.tar.gz (MD5) (PGP sign)
 2086131 Sep 24 17:46:22 2000 openssl-0.9.6.tar.gz (MD5) (PGP sign)
 1891937 Apr  3 13:29:24 2000 openssl-0.9.5a.tar.gz (MD5) (PGP sign)
 1886248 Feb 28 17:27:08 2000 openssl-0.9.5.tar.gz (MD5) (PGP sign)
 1569702 Aug  9 12:58:56 1999 openssl-0.9.4.tar.gz (MD5) (PGP sign)
 1536260 May 29 16:22:22 1999 openssl-0.9.3a.tar.gz (MD5) (PGP sign)
 1535067 May 24 22:58:17 1999 openssl-0.9.3.tar.gz (MD5) (PGP sign)
 1471369 Mar 22 18:21:53 1999 openssl-0.9.2b.tar.gz (MD5)
 1459039 Dec 28 18:25:20 1998 openssl-0.9.1c.tar.gz (MD5)

And

Amazone Web Service (S3) Download Test Ref

|

 

테스트 : http://developer.amazonwebservices.com

기간 : Nov 30, 2007 ~ May 14, 2008

 

Sample A

           지역 : Europe

           파일 크기 : 100MByte

AWS : http://testmeplease-eu.s3.amazonaws.com/100mb.bin

 

Sample B

           지역 : US

           파일 크기 : 100MByte

AWS : http://testmeplease-us.s3.amazonaws.com/100mb.bin

 

접속(Test) 지역

Sample A

Sample B

네트워크 망

France

2.27 MB/s

706 KB/s

100 전용랜

US (Seattle)

339 KB/s
507 KB/s

Cable Modem

Finland

543.93K/s

369.79 KB/s

University Network

UK (London)

1148 KB/s

647 KB/s

ADSL2+ broadband

US (Virginia)

 

2919 KB/s

University Network

Hong Kong

148.91 KB/s

180.72 KB/s

100Mb/s connection

Norway

1015 kB/s

503 kB/s

ADSL2+ 20 mbit

Germany

580.84 KB/s

2.44 MB/s

1 Gbit/s connection

Portugal

229.11 KB/s

127.20 KB/s

ADSL 8Mb

Poland

2.08 MB/s

 

1GBit+ network

US (New York)

521.29 KB/s

1.41 MB/s

20Mbps FIOS

Germany(Heidelberg)

9.93 MB/s

571.80 KB/s

 

London

25.38 MB/s

 

 

Sweden

6.74 MB/s

2.87 MB/s

FIOS, 100Mbit

Belfast e-Science Centre

12.3 MB/s

704 KB/s

gigabit port

And

ReWrite Module for Microsoft Internet Information Server

|
Microsoft Internet Information Server (IIS) 용 모듈

- IIS Mod-Rewrite from Micronovae

- IISRewrite from Qwerksoft

- ISAPI_Rewrite from isapirewrite.com

- URL Replacer from Motobit

- Ionic's ISAPI Rewrite Filter (IIRF) (open source) from Ionic Shade.

- IIS URL-rewrite (mod_rewrite-compatible) 오픈소스프로젝트 sourceforge.net

- ISAPIRewrite 오픈소스프로젝트 sourceforge.net

- Ionic's ISAPI Rewrite Filter - IIRF, Microsoft CodePlex 오픈소스프로젝트


Microsoft ASP.NET 용 HttpModule

- UrlRewriter.NET Free, open-source package. Supports .NET 1.1 and 2.0.

- URLRewriting.NET, free and open source supports, ASP.NET 2.0

- VirtualUrl.NET for ASP.NET 2 Professional URL rewriting package.


Java 2 플랫폼, J2EE 서블릿 컨테이너
- HttpRedirectFilter (open source)

- UrlRewriteFilter (open source - BSD) - allows you to rewrite URLs before they get to your Servlets, JSPs, Struts etc. Includes support for rewriting URLs passed to response.encodeURL and an annotation processor.

- URL Rewriter (open source - LGPL) - URL Rewriter is a tool for rewriting URLs in Java Servlets. It is similar to mod_rewrite.


참고해 볼만한 문서:
Tip/Trick: Url Rewriting with ASP.NET
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

How to redirect URLs to different Web sites
http://support.microsoft.com/kb/324000/
And

URL Rewriting Guide

|

URL Rewriting Guide

This document supplements the mod_rewrite reference documentation. It describes how one can use Apache's mod_rewrite to solve typical URL-based problems with which webmasters are commonony confronted. We give detailed descriptions on how to solve each problem by configuring URL rewriting rulesets.

ATTENTION: Depending on your server configuration it may be necessary to slightly change the examples for your situation, e.g. adding the [PT] flag when additionally using mod_alias and mod_userdir, etc. Or rewriting a ruleset to fit in .htaccess context instead of per-server context. Always try to understand what a particular ruleset really does before you use it. This avoids many problems.
top

Canonical URLs

Description:

On some webservers there are more than one URL for a resource. Usually there are canonical URLs (which should be actually used and distributed) and those which are just shortcuts, internal ones, etc. Independent of which URL the user supplied with the request he should finally see the canonical one only.

Solution:

We do an external HTTP redirect for all non-canonical URLs to fix them in the location view of the Browser and for all subsequent requests. In the example ruleset below we replace /~user by the canonical /u/user and fix a missing trailing slash for /u/user.

 RewriteRule   ^/~([^/]+)/?(.*)    /u/$1/$2  [R]
                    RewriteRule   ^/([uge])/([^/]+)$  /$1/$2/ [R] 
top

Canonical Hostnames

Description:
The goal of this rule is to force the use of a particular hostname, in preference to other hostnames which may be used to reach the same site. For example, if you wish to force the use of www.example.com instead of example.com, you might use a variant of the following recipe.
Solution:

For sites running on a port other than 80:

 RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
                    RewriteCond %{HTTP_HOST}   !^$
                    RewriteCond %{SERVER_PORT} !^80$
                    RewriteRule ^/(.*)         http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R] 

And for a site running on port 80

 RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
                    RewriteCond %{HTTP_HOST}   !^$
                    RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R] 
top

Moved DocumentRoot

Description:

Usually the DocumentRoot of the webserver directly relates to the URL "/". But often this data is not really of top-level priority. For example, you may wish for visitors, on first entering a site, to go to a particular subdirectory /about/. This may be accomplished using the following ruleset:

Solution:

We redirect the URL / to /about/:

 RewriteEngine on
                    RewriteRule ^/$ /about/  [R] 

Note that this can also be handled using the RedirectMatch directive:

RedirectMatch ^/$ http://example.com/e/www/

top

Trailing Slash Problem

Description:

The vast majority of "trailing slash" problems can be dealt with using the techniques discussed in the FAQ entry. However, occasionally, there is a need to use mod_rewrite to handle a case where a missing trailing slash causes a URL to fail. This can happen, for example, after a series of complex rewrite rules.

Solution:

The solution to this subtle problem is to let the server add the trailing slash automatically. To do this correctly we have to use an external redirect, so the browser correctly requests subsequent images etc. If we only did a internal rewrite, this would only work for the directory page, but would go wrong when any images are included into this page with relative URLs, because the browser would request an in-lined object. For instance, a request for image.gif in /~quux/foo/index.html would become /~quux/image.gif without the external redirect!

So, to do this trick we write:

 RewriteEngine  on
                    RewriteBase    /~quux/
                    RewriteRule    ^foo$ foo/ [R] 

Alternately, you can put the following in a top-level .htaccess file in the content directory. But note that this creates some processing overhead.

 RewriteEngine  on
                    RewriteBase    /~quux/
                    RewriteCond    %{REQUEST_FILENAME} -d RewriteRule    ^(.+[^/])$           $1/ [R] 
top

Move Homedirs to Different Webserver

Description:

Many webmasters have asked for a solution to the following situation: They wanted to redirect just all homedirs on a webserver to another webserver. They usually need such things when establishing a newer webserver which will replace the old one over time.

Solution:

The solution is trivial with mod_rewrite. On the old webserver we just redirect all /~user/anypath URLs to http://newserver/~user/anypath.

 RewriteEngine on
                    RewriteRule   ^/~(.+)  http://newserver/~$1  [R,L] 
top

Search pages in more than one directory

Description:

Sometimes it is necessary to let the webserver search for pages in more than one directory. Here MultiViews or other techniques cannot help.

Solution:

We program a explicit ruleset which searches for the files in the directories.

 RewriteEngine on
                    
                    #   first try to find it in dir1/...
                    #   ...and if found stop and be happy:
                    RewriteCond         /your/docroot/dir1/%{REQUEST_FILENAME}  -f
                    RewriteRule  ^(.+)  /your/docroot/dir1/$1  [L]
                    
                    #   second try to find it in dir2/...
                    #   ...and if found stop and be happy:
                    RewriteCond         /your/docroot/dir2/%{REQUEST_FILENAME}  -f
                    RewriteRule  ^(.+)  /your/docroot/dir2/$1  [L]
                    
                    #   else go on for other Alias or ScriptAlias directives,
                    #   etc.
                    RewriteRule   ^(.+)  -  [PT] 
top

Set Environment Variables According To URL Parts

Description:

Perhaps you want to keep status information between requests and use the URL to encode it. But you don't want to use a CGI wrapper for all pages just to strip out this information.

Solution:

We use a rewrite rule to strip out the status information and remember it via an environment variable which can be later dereferenced from within XSSI or CGI. This way a URL /foo/S=java/bar/ gets translated to /foo/bar/ and the environment variable named STATUS is set to the value "java".

 RewriteEngine on
                    RewriteRule   ^(.*)/S=([^/]+)/(.*)    $1/$3 [E=STATUS:$2] 
top

Virtual User Hosts

Description:

Assume that you want to provide www.username.host.domain.com for the homepage of username via just DNS A records to the same machine and without any virtualhosts on this machine.

Solution:

For HTTP/1.0 requests there is no solution, but for HTTP/1.1 requests which contain a Host: HTTP header we can use the following ruleset to rewrite http://www.username.host.com/anypath internally to /home/username/anypath:

 RewriteEngine on
                    RewriteCond   %{HTTP_HOST}                 ^www\.[^.]+\.host\.com$
                    RewriteRule   ^(.+)                        %{HTTP_HOST}$1          [C]
                    RewriteRule   ^www\.([^.]+)\.host\.com(.*) /home/$1$2 
top

Redirect Homedirs For Foreigners

Description:

We want to redirect homedir URLs to another webserver www.somewhere.com when the requesting user does not stay in the local domain ourdomain.com. This is sometimes used in virtual host contexts.

Solution:

Just a rewrite condition:

 RewriteEngine on
                    RewriteCond   %{REMOTE_HOST} !^.+\.ourdomain\.com$ RewriteRule   ^(/~.+)         http://www.somewhere.com/$1 [R,L] 
top

Redirecting Anchors

Description:

By default, redirecting to an HTML anchor doesn't work, because mod_rewrite escapes the # character, turning it into %23. This, in turn, breaks the redirection.

Solution:

Use the [NE] flag on the RewriteRule. NE stands for No Escape.

top

Time-Dependent Rewriting

Description:

When tricks like time-dependent content should happen a lot of webmasters still use CGI scripts which do for instance redirects to specialized pages. How can it be done via mod_rewrite?

Solution:

There are a lot of variables named TIME_xxx for rewrite conditions. In conjunction with the special lexicographic comparison patterns <STRING, >STRING and =STRING we can do time-dependent redirects:

 RewriteEngine on
                    RewriteCond   %{TIME_HOUR}%{TIME_MIN} >0700
                    RewriteCond   %{TIME_HOUR}%{TIME_MIN} <1900
                    RewriteRule   ^foo\.html$             foo.day.html
                    RewriteRule   ^foo\.html$             foo.night.html 

This provides the content of foo.day.html under the URL foo.html from 07:00-19:00 and at the remaining time the contents of foo.night.html. Just a nice feature for a homepage...

top

Backward Compatibility for YYYY to XXXX migration

Description:

How can we make URLs backward compatible (still existing virtually) after migrating document.YYYY to document.XXXX, e.g. after translating a bunch of .html files to .phtml?

Solution:

We just rewrite the name to its basename and test for existence of the new extension. If it exists, we take that name, else we rewrite the URL to its original state.

 #   backward compatibility ruleset for
                    #   rewriting document.html to document.phtml
                    #   when and only when document.phtml exists
                    #   but no longer document.html
                    RewriteEngine on
                    RewriteBase   /~quux/
                    #   parse out basename, but remember the fact
                    RewriteRule   ^(.*)\.html$              $1      [C,E=WasHTML:yes]
                    #   rewrite to document.phtml if exists
                    RewriteCond   %{REQUEST_FILENAME}.phtml -f
                    RewriteRule   ^(.*)$ $1.phtml                   [S=1]
                    #   else reverse the previous basename cutout
                    RewriteCond   %{ENV:WasHTML}            ^yes$
                    RewriteRule   ^(.*)$ $1.html 
top

Content Handling

From Old to New (intern)

Description:

Assume we have recently renamed the page foo.html to bar.html and now want to provide the old URL for backward compatibility. Actually we want that users of the old URL even not recognize that the pages was renamed.

Solution:

We rewrite the old URL to the new one internally via the following rule:

 RewriteEngine  on
                    RewriteBase    /~quux/
                    RewriteRule    ^foo\.html$ bar.html 

From Old to New (extern)

Description:

Assume again that we have recently renamed the page foo.html to bar.html and now want to provide the old URL for backward compatibility. But this time we want that the users of the old URL get hinted to the new one, i.e. their browsers Location field should change, too.

Solution:

We force a HTTP redirect to the new URL which leads to a change of the browsers and thus the users view:

 RewriteEngine  on
                    RewriteBase    /~quux/
                    RewriteRule    ^foo\.html$ bar.html  [R] 

From Static to Dynamic

Description:

How can we transform a static page foo.html into a dynamic variant foo.cgi in a seamless way, i.e. without notice by the browser/user.

Solution:

We just rewrite the URL to the CGI-script and force the handler to be cgi-script so that it is executed as a CGI program. This way a request to /~quux/foo.html internally leads to the invocation of /~quux/foo.cgi.

 RewriteEngine  on
                    RewriteBase    /~quux/
                    RewriteRule    ^foo\.html$  foo.cgi [H=cgi-script] 
top

Access Restriction

Blocking of Robots

Description:

How can we block a really annoying robot from retrieving pages of a specific webarea? A /robots.txt file containing entries of the "Robot Exclusion Protocol" is typically not enough to get rid of such a robot.

Solution:

We use a ruleset which forbids the URLs of the webarea /~quux/foo/arc/ (perhaps a very deep directory indexed area where the robot traversal would create big server load). We have to make sure that we forbid access only to the particular robot, i.e. just forbidding the host where the robot runs is not enough. This would block users from this host, too. We accomplish this by also matching the User-Agent HTTP header information.

 RewriteCond %{HTTP_USER_AGENT}   ^NameOfBadRobot.*
                    RewriteCond %{REMOTE_ADDR}       ^123\.45\.67\.[8-9]$
                    RewriteRule ^/~quux/foo/arc/.+   -   [F] 

Blocked Inline-Images

Description:

Assume we have under http://www.quux-corp.de/~quux/ some pages with inlined GIF graphics. These graphics are nice, so others directly incorporate them via hyperlinks to their pages. We don't like this practice because it adds useless traffic to our server.

Solution:

While we cannot 100% protect the images from inclusion, we can at least restrict the cases where the browser sends a HTTP Referer header.

 RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.quux-corp.de/~quux/.*$ [NC]
                    RewriteRule .*\.gif$ -                                    [F] 
 RewriteCond %{HTTP_REFERER}         !^$
                    RewriteCond %{HTTP_REFERER}         !.*/foo-with-gif\.html$
                    RewriteRule ^inlined-in-foo\.gif$ -                        [F] 

Proxy Deny

Description:

How can we forbid a certain host or even a user of a special host from using the Apache proxy?

Solution:

We first have to make sure mod_rewrite is below(!) mod_proxy in the Configuration file when compiling the Apache webserver. This way it gets called before mod_proxy. Then we configure the following for a host-dependent deny...

 RewriteCond %{REMOTE_HOST} ^badhost\.mydomain\.com$ RewriteRule !^http://[^/.]\.mydomain.com.*  - [F] 

...and this one for a user@host-dependent deny:

 RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} ^badguy@badhost\.mydomain\.com$ RewriteRule !^http://[^/.]\.mydomain.com.*  - [F] 
top

Other

External Rewriting Engine

Description:

A FAQ: How can we solve the FOO/BAR/QUUX/etc. problem? There seems no solution by the use of mod_rewrite...

Solution:

Use an external RewriteMap, i.e. a program which acts like a RewriteMap. It is run once on startup of Apache receives the requested URLs on STDIN and has to put the resulting (usually rewritten) URL on STDOUT (same order!).

 RewriteEngine on
                    RewriteMap    quux-map prg:/path/to/map.quux.pl
                    RewriteRule   ^/~quux/(.*)$  /~quux/${quux-map:$1} 
 #!/path/to/perl
                    
                    #   disable buffered I/O which would lead
                    #   to deadloops for the Apache server
                    $| = 1;
                    
                    #   read URLs one per line from stdin and
                    #   generate substitution URL on stdout
                    while (<>) {
                    s|^foo/|bar/|;
                    print $_;
                    } 

This is a demonstration-only example and just rewrites all URLs /~quux/foo/... to /~quux/bar/.... Actually you can program whatever you like. But notice that while such maps can be used also by an average user, only the system administrator can define it.

And
prev | 1 | 2 | next