<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.imanpage.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Iman&#039;s Page - Linux</title>
 <link>http://www.imanpage.com/taxonomy/term/16/all</link>
 <description></description>
 <language>en</language>
<item>
 <title>URL rewriting and add www to .htaccess for hosting multiple domain or multi sites</title>
 <link>http://www.imanpage.com/code/url-rewriting-and-add-www-htaccess-hosting-multiple-domain-or-multi-sites</link>
 <description>Adding the www to URL in .htaccess for hosting multiple domain or multisites and handle www issue for canonical URLs. 

&lt;br /&gt;

&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;bash geshifilter-bash&quot; style=&quot;font-family:monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;##Adding the www&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RewriteCond &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#123;&lt;/span&gt;HTTP_HOST&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;!&lt;/span&gt;^www\. &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;NC&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RewriteCond &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#123;&lt;/span&gt;HTTP_HOST&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#125;&lt;/span&gt; ^&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;.&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;$ &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;NC&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RewriteRule ^&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;.&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;$ &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;http://www.%1/$1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;L,&lt;span style=&quot;color: #007800;&quot;&gt;R&lt;/span&gt;=&lt;span style=&quot;color: #000000;&quot;&gt;301&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;

&lt;br /&gt;

The other way around you can &lt;a href=&quot;http://www.imanpage.com/code/remove-www-and-rewrite-url-multi-sites-or-subdomains-htaccess&quot; &gt;removing the www&lt;/a&gt; from URL.

&lt;br /&gt;
&lt;br /&gt;</description>
 <comments>http://www.imanpage.com/code/url-rewriting-and-add-www-htaccess-hosting-multiple-domain-or-multi-sites#comments</comments>
 <category domain="http://www.imanpage.com/code">Code</category>
 <category domain="http://www.imanpage.com/code/htaccess">.htaccess</category>
 <category domain="http://www.imanpage.com/code/apache">Apache</category>
 <category domain="http://www.imanpage.com/code/bash">Bash</category>
 <category domain="http://www.imanpage.com/code/linux">Linux</category>
 <pubDate>Mon, 08 Feb 2010 13:43:33 +0000</pubDate>
 <dc:creator>Iman</dc:creator>
 <guid isPermaLink="false">30 at http://www.imanpage.com</guid>
</item>
<item>
 <title>Remove www and rewrite URL for multi-sites or subdomains in .htaccess</title>
 <link>http://www.imanpage.com/code/remove-www-and-rewrite-url-multi-sites-or-subdomains-htaccess</link>
 <description>If you are running a Multisites or Subdomains sites this .htaccess RewriteRule code might come in handy specially for purpose of SEO. You can clean up your URL from http://www.yourdomain.com to http://yourdomain.com and remove the “www” with 301 redirect to non-www.

&lt;br /&gt;

&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;bash geshifilter-bash&quot; style=&quot;font-family:monospace;&quot;&gt;RewriteEngine on&lt;br /&gt;
RewriteCond &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#123;&lt;/span&gt;HTTP_HOST&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#125;&lt;/span&gt; ^www\.&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;.+&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;$ &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;NC&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;
RewriteRule ^&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;.&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;$ http:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;//%&lt;/span&gt;1&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;$1 &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;L,&lt;span style=&quot;color: #007800;&quot;&gt;R&lt;/span&gt;=&lt;span style=&quot;color: #000000;&quot;&gt;301&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;

&lt;br /&gt;

If you want to add the &lt;a href=&quot;http://www.imanpage.com/code/url-rewriting-and-add-www-htaccess-hosting-multiple-domain-or-multi-sites&quot; &gt;www to URLs&lt;/a&gt; check this out. 

&lt;br /&gt;
&lt;br /&gt;</description>
 <comments>http://www.imanpage.com/code/remove-www-and-rewrite-url-multi-sites-or-subdomains-htaccess#comments</comments>
 <category domain="http://www.imanpage.com/code">Code</category>
 <category domain="http://www.imanpage.com/code/htaccess">.htaccess</category>
 <category domain="http://www.imanpage.com/code/apache">Apache</category>
 <category domain="http://www.imanpage.com/code/linux">Linux</category>
 <pubDate>Fri, 05 Feb 2010 16:29:03 +0000</pubDate>
 <dc:creator>Iman</dc:creator>
 <guid isPermaLink="false">29 at http://www.imanpage.com</guid>
</item>
<item>
 <title>Convert Linux/Unix timestamp to human readable format in PHP</title>
 <link>http://www.imanpage.com/code/convert-linuxunix-timestamp-human-readable-format-php</link>
 <description>&lt;p&gt;This functin will help to convert the Linux/Unix timestamp to human readable format:&lt;/p&gt;
&lt;div class=&quot;codeblock geshifilter&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;unix_timestamp_to_human&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$timestamp&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$format&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;D&amp;nbsp;d&amp;nbsp;M&amp;nbsp;Y&amp;nbsp;-&amp;nbsp;H:i:s&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(empty(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$timestamp&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&amp;nbsp;||&amp;nbsp;!&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;is_numeric&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$timestamp&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$timestamp&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;time&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$timestamp&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&amp;nbsp;?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$format&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$timestamp&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&amp;nbsp;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$format&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$timestamp&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$unix_time&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;1251208071&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;unix_timestamp_to_human&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$unix_time&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//Return:&amp;nbsp;Tue&amp;nbsp;25&amp;nbsp;Aug&amp;nbsp;2009&amp;nbsp;-&amp;nbsp;14:47:51&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;</description>
 <comments>http://www.imanpage.com/code/convert-linuxunix-timestamp-human-readable-format-php#comments</comments>
 <category domain="http://www.imanpage.com/code">Code</category>
 <category domain="http://www.imanpage.com/code/date">Date</category>
 <category domain="http://www.imanpage.com/code/function">Function</category>
 <category domain="http://www.imanpage.com/code/human">Human</category>
 <category domain="http://www.imanpage.com/code/php">PHP</category>
 <category domain="http://www.imanpage.com/code/time">Time</category>
 <category domain="http://www.imanpage.com/code/timestamp">Timestamp</category>
 <category domain="http://www.imanpage.com/code/unix">Unix</category>
 <category domain="http://www.imanpage.com/code/linux">Linux</category>
 <pubDate>Tue, 25 Aug 2009 17:07:32 +0000</pubDate>
 <dc:creator>Iman</dc:creator>
 <guid isPermaLink="false">27 at http://www.imanpage.com</guid>
</item>
<item>
 <title>How to find file or folder location in Linux/Unix usnig bash command line</title>
 <link>http://www.imanpage.com/code/how-find-file-or-folder-location-linuxunix-usnig-bash-command-line</link>
 <description>&lt;p&gt;Use this grep commend&lt;/p&gt;

&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;bash geshifilter-bash&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;locate&lt;/span&gt; apache &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;egrep&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;\/apache$&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Example:&lt;/p&gt;

&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;bash geshifilter-bash&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;myserver&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;$: &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;locate&lt;/span&gt; apache &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;egrep&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;\/apache$&amp;quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;myserver&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;$: &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;usr&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;local&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dh&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;apache&lt;/div&gt;&lt;/div&gt;</description>
 <comments>http://www.imanpage.com/code/how-find-file-or-folder-location-linuxunix-usnig-bash-command-line#comments</comments>
 <category domain="http://www.imanpage.com/code">Code</category>
 <category domain="http://www.imanpage.com/code/bash">Bash</category>
 <category domain="http://www.imanpage.com/code/command">Command</category>
 <category domain="http://www.imanpage.com/code/linux">Linux</category>
 <pubDate>Wed, 29 Jul 2009 09:59:54 +0000</pubDate>
 <dc:creator>Iman</dc:creator>
 <guid isPermaLink="false">17 at http://www.imanpage.com</guid>
</item>
</channel>
</rss>
<!-- Page cached by Boost @ 2010-09-06 09:10:06, expires @ 2010-09-06 10:10:06 -->
