<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Syam's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 07:49:25 GMT</pubDate>
    <description>DZone Snippets: Syam's Code Snippets</description>
    <item>
      <title>Show link location</title>
      <link>http://snippets.dzone.com/posts/show/221</link>
      <description>Use this in your print style sheet. Works only in "better browsers".&lt;br /&gt;&lt;br /&gt;&lt;code&gt;a[href] {&lt;br /&gt;  text-decoration: none;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;a[href]:after {&lt;br /&gt;  content: " (" attr(href)") ";&lt;br /&gt;       }&lt;/code&gt;</description>
      <pubDate>Sat, 23 Apr 2005 18:36:10 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/221</guid>
      <author>Syam (Syam Kumar R.)</author>
    </item>
    <item>
      <title>301 example.com to www.example.com</title>
      <link>http://snippets.dzone.com/posts/show/220</link>
      <description>&lt;code&gt;RewriteEngine On&lt;br /&gt;&lt;br /&gt;RewriteCond %{HTTP_HOST} !^(.*)\.example\.com$ [NC]&lt;br /&gt;RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]&lt;/code&gt;</description>
      <pubDate>Sat, 23 Apr 2005 18:01:08 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/220</guid>
      <author>Syam (Syam Kumar R.)</author>
    </item>
    <item>
      <title>Content Negotiation</title>
      <link>http://snippets.dzone.com/posts/show/207</link>
      <description>Serve XHTML as application/xhtml+xml to browsers which accept it (and to W3C Validator).&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;?php &lt;br /&gt;header("Vary: Accept");&lt;br /&gt;if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') || stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator"))&lt;br /&gt;{&lt;br /&gt;  header('Content-type: application/xhtml+xml');&lt;br /&gt;  echo "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n";&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;  header('Content-type: text/html');&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 22 Apr 2005 02:41:13 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/207</guid>
      <author>Syam (Syam Kumar R.)</author>
    </item>
  </channel>
</rss>
