Skip to content

Instantly share code, notes, and snippets.

@elegantcoder
Created August 31, 2012 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elegantcoder/3551478 to your computer and use it in GitHub Desktop.
Save elegantcoder/3551478 to your computer and use it in GitHub Desktop.
README
# +Includes 를 넣었습니다. 이것은 httpd.conf 에서 <Directory> 설정을 상속받아 Includes를 추가해주어야 하므로
# Options Includes 가 아니라  Options +Includes 입니다.
# .htaccess 를 사용하려면 <Directory> 에서 AllowOverride All 로 설정하세요.
AddOutputFilter INCLUDES .html
Options +Includes

SSI 를 통한 HTML 산출물 모듈화

<meta charset="utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="" />
<meta name="author" content="elco" />
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<!DOCTYPE html>
<html lang="en">
<head>
<!--#include virtual="_header.html" -->
<title>html5_boilerplate</title>
</head>
<body>
<div>
<header>
<h1>html5_boilerplate</h1>
</header>
<nav>
<p>
<a href="/">Home</a>
</p>
<p>
<a href="/contact">Contact</a>
</p>
</nav>
<div>
</div>
<footer>
<!--#include virtual="_footer.html" -->
</footer>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>User Agent Sniffing Example</title>
</head>
<body>
<h1>User Agent Sniffing Example</h1>
<div><span>User-agent String:</span><span><!--#echo var="HTTP_USER_AGENT" --></span></div>
<!--#if expr="$HTTP_USER_AGENT = /Chrome/" -->
<!--#set var="ua_result" value="Chrome" -->
<!--#elif expr="$HTTP_USER_AGENT = /Safari/" -->
<!--#set var="ua_result" value="Safari" -->
<!--#elif expr="$HTTP_USER_AGENT = /Firefox/" -->
<!--#set var="ua_result" value="Firefox" -->
<!--#elif expr="$HTTP_USER_AGENT = /MSIE/" -->
<!--#set var="ua_result" value="Internet Explorer" -->
<!--#endif -->
<div><span>so, u r using : </span><span><!--#echo var="ua_result" --></span></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment