<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vision Master Designs &#187; Apache</title>
	<atom:link href="http://visionmasterdesigns.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://visionmasterdesigns.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 29 Oct 2009 20:00:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Tutorial : Installing Apache 2.2.11, PHP 5.3, MySQL 5.1.34 &amp; PhpMyAdmin 3.1.4 in Windows Vista/XP</title>
		<link>http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/</link>
		<comments>http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 19:04:26 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[PhpMyAdmin]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://blog.visionmasterdesigns.com/?p=7</guid>
		<description><![CDATA[Learn to install Apache, PHP 5, MySQL 5 and PhpMyAdmin 2.11.x step by step. It has been rated as the best article :).]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<blockquote><p>
The most recent version of this tutorial has been completely re-written at <a href="http://webdevcodex.com">WebDev Codex</a>.</p>
<p>Learn how to Install <strong>PHP 5.3</strong>,</p>
<p>To view the latest version, Goto <a title="Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 &amp; PHPMyAdmin 3.2 for Windows 7/Vista" href="http://webdevcodex.com/screencast-installing-apache-2-2-php-5-3-mysql-5-1-phpmyadmin-3-2-for-windows-7vista/">Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 &#038; PHPMyAdmin 3.2 for Windows 7/Vista</a></p>
<p>If you want to see the screencast of this tutorial, then goto<br />
<a title="Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 &amp; PHPMyAdmin 3.2 for Windows 7/Vista" href="http://webdevcodex.com/screencast-installing-apache-2-2-php-5-3-mysql-5-1-phpmyadmin-3-2-for-windows-7vista/">Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 &#038; PHPMyAdmin 3.2 for Windows 7/Vista</a>
</p></blockquote>
<p>Not everyone would spend money online to buy webspace just so that they can test out how their latest application works, Well&#8230; Welcome to Vision Master Designs Blog. This tutorial will teach you to set up a developer environment for PHP/MySQL in your computer in no time.</p>
<p>Index :</p>
<ul>
<li>Page 1 : <a title="Introduction" href="http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/">Introduction</a></li>
<li>Page 2 : <a title="Create Directories &amp; Install Apache" href="http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/2/">Create Directories &amp; Install Apache</a></li>
<li>Page 3 : <a title="Install PHP5 &amp; Configure php.ini" href="http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/3/">Install PHP5 &amp; Configure php.ini</a></li>
<li>Page 4 : <a href="http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/4/">Configure Apache 2.2</a></li>
<li>Page 5 : <a href="http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/5/">Installing &amp; Configuring MySQL5</a></li>
<li>Page 6 : <a href="http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/6/">Installing &amp; Configuring PhpMyAdmin</a></li>
</ul>
<p><span id="more-7"></span></p>
<p>If you are aware of the basics then <a href="#down">Click Here</a> to jump below, else read on.</p>
<p>Normally we can view HTML pages on our computer without the need of uploading them to the server, since HTML is a Client Side Language. You don`t need any extra software to view html files, just any browser will do the trick.<br />
But if you want to make your pages dynamic using any Server Side Language (PHP,ASP,JSP) &amp; want to the see the results then you must upload the file to the webserver which supports that language so it can execute the file &amp; return the results on your browser</p>
<p>We can set up a developers environment from which you can create and execute PHP/MySQL scripts by installing the above mentioned applications.</p>
<p><a id="down" name="down">Now, The Pre-Requisites :</a></p>
<ol>
<li><strong>Apache HTTP Server</strong> (2.2.11): The best open source webserver. You need this to turn your humble computer to a powerful webserver to execute your applications.<br />
Direct Download <a title="apache_2.2.11-win32-x86-no_ssl.msi" href="http://www.eng.lsu.edu/mirrors/apache/httpd/binaries/win32/apache_2.2.11-win32-x86-no_ssl.msi">apache_2.2.11-win32-x86-no_ssl-r2.msi</a><br />
<a href="http://httpd.apache.org/download.cgi">Apache Download Page</a> &#8211; Please Download the Win32 Binary without crypto (no mod_ssl) (MSI Installer) &#8211; apache_2.2.11-win32-x86-no_ssl.msi~ 4.3MB</li>
<li><strong>PHP </strong>(5.2.9)<strong> : </strong>One of the most powerful web programming languages.<br />
Direct Download <a href="http://www.php.net/get/php-5.2.9-2-Win32.zip/from/a/mirror" target="_blank">PHP 5.2.9 -2 zip package</a><br />
<a href="http://www.php.net/downloads.php">PHP Download Page</a> &#8211; Download the PHP 5.2.9 &#8211; 2 Zip package ~ 10MB</li>
<li><strong>MySQL</strong> (5.1.34) : One of the best DBMS packages which is free.<br />
The latest version is <strong>5.1.34</strong> which is stable and used in production servers. Although MySQL 5.1 and MySQL 6 are also available as beta releases, they are not used in production servers as of now.<br />
<a href="http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-essential-5.1.34-win32.msi/from/pick" target="_blank">MySQL Download Page</a> &#8211; Please download Windows ZIP/Setup.EXE (x86) 5.1.34 ~ 35.2MB</li>
<li><strong>PhpMyAdmin</strong> (<span class="version">3.1.4</span>) : Used to manage your MySQL databases directly using your web browser.<br />
Direct Download <a href="http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-3.1.4-english.zip#!md5!ec09a86b298c118b528d5d9936aa951a" target="_blank">phpMyAdmin-<span class="version">3.1.4</span>-all-languages.zip</a><br />
<a href="http://www.phpmyadmin.net/home_page/downloads.php">PHPMyAdmin Download Page</a> &#8211; Please download the latest release from the 3.x rooster.</li>
</ol>
<p>The above downloads are compatible with Windows Vista/Vista SP1 (32 bit OS).</p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/feed/</wfw:commentRss>
		<slash:comments>566</slash:comments>
		</item>
		<item>
		<title>Tutorial : Creating a SVN setup in Windows Vista/XP using Subversion,TortoiseSVN</title>
		<link>http://visionmasterdesigns.com/tutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn/</link>
		<comments>http://visionmasterdesigns.com/tutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 15:40:46 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[TortoiseSVN]]></category>

		<guid isPermaLink="false">http://www.visionmasterdesigns.com/?p=613</guid>
		<description><![CDATA[What is SVN ? Why is it required ? You might be wondering. While developing applications for the web or any other area, most of us would be trying and testing the code on our local machines, sometimes it happens, while in the flow of coding, we tend to do some drastic changes to the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/09/svnlogo.jpg" alt="SVN LOGO" width="149" height="137" class="floatLImg" />What is <strong>SVN</strong> ? Why is it required ? You might be wondering. While developing applications for the web or any other area, most of us would be trying and testing the code on our local machines, sometimes it happens, while in the flow of coding, we tend to do some drastic changes to the sourcecode (atleast I do) only to find out that the application is not executing anymore after that. It becomes difficult to backtrack and eventually, we end up wasting a lot of time and energy, this is where <strong>SVN</strong> comes to our rescue.</p>
<p><em>Definition according to Wikipedia :</em><br />
Subversion (SVN) is a version control system initiated in 2000 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS).</p>
<p>Index :</p>
<ul>
<li>Page 1 : <a title="Introduction" href="http://www.visionmasterdesigns.com/2008/09/tutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn">Introduction</a></li>
<li>Page 2 : <a title="Introduction" href="http://www.visionmasterdesigns.com/2008/09/tutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn/2/">Unpack and Install Subversion</a></li>
<li>Page 3 : <a title="Introduction" href="http://www.visionmasterdesigns.com/2008/09/tutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn/3/">Configure Apache</a></li>
<li>Page 4 : <a title="Introduction" href="http://www.visionmasterdesigns.com/2008/09/tutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn/4/">Install TortoiseSVN &#038; Usage</a></li>
</ul>
<p><span id="more-613"></span><br />
Now, The Pre-Requisites :</p>
<ol>
<li><strong>Apache Webserver</strong> and Localhost configuration set up. To know how to setup the webserver for local use, read <a href="http://www.visionmasterdesigns.com/2008/07/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/" title="Tutorial : Installing Apache, PHP 5, MySQL 5 &#038; PhpMyAdmin 2.11 in Windows Vista/XP">Tutorial : Installing Apache, PHP 5, MySQL 5 &amp; PhpMyAdmin 2.11 in Windows Vista/XP</a></li>
<li><strong>Subversion</strong> : Subversion is an open source version control system. We will be needing this package for the Win32 binaries for Apache 2.2.9 or higher to get a SVN setup up and running on your localhost. We can do version control using this package alone, but it is completely command line based.
<p>Click Here to goto <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100">Download Page</a>.<br />
Please download the Subversion Win32 binaries for Apache 2.2.x (2.2.9 or higher is required within the 2.2.x series)</p>
<p>For a direct link -> <a href="http://subversion.tigris.org/files/documents/15/43455/svn-win32-1.5.2.zip">svn-win32-1.5.2.zip</a><br />
<em>The latest release of Subversion is <strong>1.5.2</strong>.</em></li>
<li><strong>TortoiseSVN</strong> : TortoiseSVN is a really easy to use Revision control / version control / source control software for Windows. It is based on Subversion, and has all the features of Subversion. It is GUI based, making our lives simpler.
<p>Click Here to goto <a href="http://tortoisesvn.net/downloads">Download Page</a>.<br />
<em>The latest release of TortoiseSVN is <strong>1.5.3</strong>.</em></li>
</ol>
<h2>Introduction</h2>
<p>I have given a jist of what SVN is, we can use SVN to keep track of web-pages, documents, source code and their versions. If we want to retrieve the previous version, we can always retrieve using SVN, Subversion was recognized as the sole leader in the Standalone Software Configuration Management (SCM) category and a strong performer in the Software Configuration and Change Management (SCCM) category.</p>
<p>There are 2 ways on how you can set up a SVN server on your system i.e use Subversion&#8217;s own server or integrate it with <strong>Apache</strong>. I am going to show you, how to integrate it with Apache. Once the SVN server is setup, we can use <strong>TortoiseSVN</strong> to perform all the operations, since it gets integrated into the windows shell.</p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-creating-svn-setup-windows-vistaxp-using-subversion-tortoisesvn/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Tutorial : Creating &#8220;Pretty SEO URLS&#8221; using Apache&#8217;s mod_rewrite</title>
		<link>http://visionmasterdesigns.com/tutorial-creating-pretty-seo-url-using-apache-mod-rewrite/</link>
		<comments>http://visionmasterdesigns.com/tutorial-creating-pretty-seo-url-using-apache-mod-rewrite/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 09:11:30 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Website Optimization]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://www.visionmasterdesigns.com/?p=323</guid>
		<description><![CDATA[Imagine this, You have a dynamic site powered by PHP/MySQL, its doing ok, you have submitted your website URL to all the known search engines, but still your site doesn&#8217;t seem to get much traffic from the search engines&#8230;ever wondered why ? Well firstly, search engines have billions of pages to search. Imagine your link [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-pretty-seo-url-using-apache-mod-rewrite%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-pretty-seo-url-using-apache-mod-rewrite%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Imagine this, You have a dynamic site powered by PHP/MySQL, its doing ok, you have submitted your website URL to all the known search engines, but still your site doesn&#8217;t seem to get much traffic from the search engines&#8230;ever wondered why ?</p>
<p>Well firstly, search engines have billions of pages to search. Imagine your link to be something like <span class="code">www.yourdomain.com/index.php?page=aboutme</span>, its tough for any search engine to comprehend any keywords from the link.<br />
But how about <span class="code">www.yourdomain.com/page/about-me.html</span> ? These links are static Links, SEO Friendly Links, &#8220;Pretty Links&#8221;.</p>
<p>So today we are going to learn how to convert your ugly links into pretty links.</p>
<h4>Index</h4>
<ol>
<li>Step 1 : Enable mod_rewrite in httpd.conf</li>
<li>Step 2 : Create A Simple PHP file</li>
<li>Step 3 : .htaccess file<br />
Method 1 &#8211; For only a single Variable<br />
Method 2 &#8211; For 1 and more than 1 Variable(s)
</li>
<li>Conclusion</li>
</ol>
<p>Ugly URLs<br />
<a href="http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1" target="_blank">http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1</a><br />
<a href="http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1&amp;var=foo" target="_blank">http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1&amp;var=foo </a></p>
<p>Pretty URLs<br />
<a href="http://www.visionmasterdesigns.com/demo/seo/page1.html" target="_blank">http://www.visionmasterdesigns.com/demo/seo/page1.html</a><br />
<a href="http://www.visionmasterdesigns.com/demo/seo/page1/foo.html" target="_blank">http://www.visionmasterdesigns.com/demo/seo/page1/foo.html</a></p>
<p>Click <a href="http://www.visionmasterdesigns.com/demo/seo/seo.zip">Here</a> to download the script files.<br />
<span id="more-323"></span></p>
<h2 align="center">Step 1 : Enable mod_rewrite in httpd.conf</h2>
<p>Normally webservers already have mod_rewrite enabled. If it is not enabled, then you can request your host to enable it.</p>
<p>If you are going to try this tutorial in your local machine. Do check whether <span class="code">mod_rewrite</span> module has been enabled in Apache. Do the following.</p>
<ol>
<li>Navigate to your apache folder and open httpd.conf</li>
<li>Search for
<pre lang="apache">#LoadModule rewrite_module modules/mod_rewrite.so</pre>
</li>
<li>Remove the commenting character i.e #, then save the file.</li>
<li>Restart the Server</li>
</ol>
<h4>About the .htaccess file</h4>
<p>You must have seen or heard about <span class="code">.htaccess</span> file somewhere.</p>
<p><strong>Quote from wikipedia :</strong><br />
In the Apache web server, .htaccess (hypertext access) is the default name of directory-level configuration files. A .htaccess file is placed in a particular directory, and the directives in the .htaccess file apply to that directory, and all subdirectories thereof. It provides the ability to customize configuration for requests to the particular directory.</p>
<p>Normally the .htaccess file must be present in the directory where your script is stored.<br />
For Example : If my script is<br />
<span class="code">myserver.dev/prettyurl/test.php</span><br />
 then my <span class="code">.htaccess</span> file will be saved in<br />
  <span class="code">C:\server\www\myserver.dev\public_html\prettyurl\.htaccess</span>  <b>*</b></p>
<p>*This is applicable if you have followed &#8211;<br />
<a href="http://www.visionmasterdesigns.com/2008/07/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/">Tutorial : Installing Apache, PHP 5, MySQL 5 &#038; PhpMyAdmin 2.11 in Windows Vista/XP</a></p>
<h2 align="center">Step 2 : Create A Simple PHP file</h2>
<p>Lets create a simple PHP file. PHP allows us to retrieve values from the URL iself using $_GET function.</p>
<p>For Example :<br />
<span class="code">http://myserver.dev/prettyurl/test.php?page=mypagename</span>.<br />
$_GET['page'] would give the value of page in the above url.</p>
<p><span class="code">http://myserver.dev/prettyurl/test.php?page=mypagename&#038;var=secondvar</span>.<br />
We can have retrieve quite a lot of data from the URLs by using multiple $_GET functions. In the above URL we can have $_GET['page'] and $_GET['var']</p>
<pre class="brush: php">
&lt;?php

//test.php
//storing the retrieved val from URL into a variable
$p = $_GET[&#039;page&#039;];
$q = $_GET[&#039;var&#039;];

switch($p) {
    case &#039;page1&#039;:
    // if $p = page1 i.e url was something like test.php?page=page1
  		switch($q) {
		case &#039;boo&#039;:
		//if $p=boo then url is somehting like test.php?page=page1&amp;amp;amp;var=boo
		echo &quot;&lt;h2&gt;This is page1 And BOO&lt;/h2&gt;&lt;br /&gt;&quot;;
		break;
		case &#039;foo&#039;:
		echo &quot;&lt;h2&gt;This is page1 And FOO&lt;/h2&gt;&lt;br /&gt;&quot;;
		break;
		default:
		// if $p = page1 i.e url was something like test.php?page=page1
		echo &quot;&lt;h2&gt;This is page1&lt;/h2&gt;&quot;;
		break;
		}
    break;
    case &#039;page2&#039;:
    // if $p = page2 i.e url was something like test.php?page=page2
    echo &quot;&lt;h2&gt;This is page2&lt;/h2&gt;&quot;;
    break;
    case &#039;page3&#039;:
    // if $p = page3 i.e url was something like test.php?page=page3
    echo &quot;&lt;h2&gt;This is page3&lt;/h2&gt;&quot;;
    break;
    case &#039;page4&#039;:
    // if $p = page4 i.e url was something like test.php?page=page4
    echo &quot;&lt;h2&gt;This is page4&lt;/h2&gt;&quot;;
    break;
    default:
    // if page != any of the above, then default is executed
    echo &quot;&lt;h2&gt;This is the Default Page&lt;/h2&gt;&quot;;
	break;
}
?&gt;
</pre>
<p>Save the file as <span class="code">test.php</span>.</p>
<p>Test out the script, if we access<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1">http://myserver.dev/prettyurl/test.php?page=page1</a><br />
the result will be &#8216;This is page1&#8242;.<br />
Similarly <a href="http://myserver.dev/prettyurl/test.php?page=page2">http://myserver.dev/prettyurl/test.php?page=page2</a><br />
will show the output &#8216;This is page2&#8242; and so on.</p>
<p>If we access<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo">http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo </a><br />
the output will be &#8216;This is page1 And foo&#8217;</p>
<p>This sample code in PHP is to just show you how a general linking system works. It shows how $_GET works and how we can add data in the URL&#8217;s using &#8216;&#038;&#8217; operator.</p>
<h2 align="center">Step 3 : .htaccess file</h2>
<p>There are different methods to create &#8220;Pretty URLS&#8221;. I`ll just discuss the most common and the most optimized ones.</p>
<p>Ok ! Firstly our local server won`t have a .htaccess file, so we will have to create one. Fire up notepad, then type the following code.<br />
Save the file as <span class="code">.htaccess</span>. Place it in the directory where you have saved your <span class="code">test.php</span> script.</p>
<h4>Method 1 &#8211; For only a single Variable</h4>
<p>Consider our dynamic URL to be<br />
<span class="code">http://myserver.dev/prettyurl/test.php?page=page2</span><br />
and we want our pretty url to look something like<br />
<span class="code">http://myserver.dev/prettyurl/page2.html</span> </p>
<pre lang="apache">
#.htaccess code
RewriteEngine On
RewriteRule ^(.*)\.html$ test.php?page=$1 [L]
</pre>
<p>Let me explain what every line does.</p>
<ul>
<li><span class="code">RewriteEngine On</span><br />
This tells to start the Rewrite Engine.</li>
<li><span class="code">RewriteRule ^(.*)\.html$ test.php?page=$1 [L]</span><br />
The basic syntax of<br />
RewriteRule pattern target_url [flag,flag,flag,…]</p>
<ol>
<li>pattern is <span class="code">^(.*)\.html$</span><br />
() &#8211; Parentheses allow you to group several characters as a unit and also to capture the results of a match for later use. The ability to treat several characters as a unit is extremely useful in pattern matching. </p>
<p><span class="code">(.*)</span> &#8211; Matches anything.<br />
Eg: http://myserver.dev/prettyurl/page1.html where (.*)\.html matches page1.html
</li>
<li>
target_url is <span class="code">test.php?page=$1 </span><br />
$1 is a variable where $1 = (.*) from the pattern.
</li>
<li>
flag is <span class="code">[L]</span>.<br />
There are various flags. [L] means, If there is a match with a particular rewrite rule, It has to be the last rewrite rule to be executed.
</li>
</ol>
</li>
</ul>
<p>Now lets test run our script. If the dynamic link is like<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1">http://myserver.dev/prettyurl/test.php?page=page1</a><br />
then your pretty link will be<br />
<a href="http://myserver.dev/prettyurl/page1.html">http://myserver.dev/prettyurl/page1.html</a><br />
Similarly for page=page2 the link will be page2.html ,page=page3 the link will be page3.html.</p>
<p>Phew ! That took a lot of time. If you are able to see the same output for both the ugly links and the pretty links, then you Rewrite rules are working perfectly.</p>
<h4>Method 2 &#8211; For 1 and more than 1 Variable(s)</h4>
<p>Now what if your dynamic URL was like<br />
<span class="code">http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo</span>.<br />
For the above dynamic URL we want our static URL to look something like<br />
<span class="code">http://myserver.dev/prettyurl/page1/foo.html</span>.<br />
We want the first variable to act as a directory, while the second one should be the file name.</p>
<p>Note that previously page=page1 had become &#8216;page1.html&#8217; since there was just one variable. But now we have 2 variables (page=page1&#038;var=foo) so we the structure should be like &#8216;page1/foo.html&#8217;</p>
<p>We have to write a new RewriteRule to support 2 variables.<br />
<strong>Remember : As your variables increase, the new Rewrite rules come before the previous ones.</strong></p>
<p>We are basically extending Method 1 by adding another RewriteRule to support 2 variables as input.</p>
<pre lang="apache">
RewriteEngine On
RewriteRule ([^/]+)/(.*)\.html$ test.php?page=$1&#038;var=$2 [L]
RewriteRule ^(.*)\.html$ test.php?page=$1 [L]
</pre>
<p>Let me Explain what the new line does.<br />
<span class="code">RewriteRule ([^/]+)/(.*)\.html$ test.php?page=$1&#038;var=$2 [L]</span></p>
<ol>
<li>pattern is <span class="code">([^/]+)/(.*)\.html$</span><br />
<span class="code">([^/]+)</span> &#8211; Which has the effect of matching any characters up to a slash or the end of the string, whichever comes first.<br />
<span class="code">(.*)</span> &#8211; Matches anything</p>
<p><span class="code">([^/]+)/(.*)\.html$</span> &#8211; characters up to slash &#8216;/&#8217; any characters &#8216;.html&#8217;<br />
Eg: page1/foo.html where ([^/]+) matches page1 and (.*)\.html matches foo.html
</li>
<li>
target_url is <span class="code">test.php?page=$1&#038;var=$2 </span><br />
Every variable i.e $1 and $2 matches with the unit inside the paranthesis.<br />
$1 = ([^/]+)<br />
$2 = (.*)
</li>
<li>
flag is <span class="code">[L]</span>.<br />
There are various flags. [L] means, If there is a match with a particular rewrite rule, It has to be the last rewrite rule to be executed.
</li>
</ol>
<p>You can test it out<br />
For all dynamic links like<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo">http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo </a><br />
will have static URL&#8217;s like<br />
<a href="http://myserver.dev/prettyurl/page1/foo.html">http://myserver.dev/prettyurl/page1/foo.html</a></p>
<h2 align="center">Conclusion</h2>
<p>(Method 1 &nbsp; Method 2)<br />
Thus for all dynamic links like</p>
<p>http://myserver.dev/prettyurl/test.php?page=pagex</p>
<p>will have static URL&#8217;s like</p>
<p>http://myserver.dev/prettyurl/pagex.html</p>
<p>(Method 2)<br />
For all dynamic links like</p>
<p>http://myserver.dev/prettyurl/test.php?page=pagex&#038;var=foo</p>
<p>will have static URL&#8217;s like</p>
<p>http://myserver.dev/prettyurl/pagex/foo.html</p>
<p>This was quite a basic tutorial. It is tough to understand the string matching patterns initially. But the logic is very simple. I hope the tutorial wasn&#8217;t tough to understand. If you guys have any doubts, feel free to comment here, I`ll try to solve them. Cya</p>
<p>Click <a href="http://www.visionmasterdesigns.com/demo/seo/seo.zip">Here</a> to download the files.</p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-creating-pretty-seo-url-using-apache-mod-rewrite/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Tutorial : Installing Ruby on Rails 2 in Windows Vista/XP</title>
		<link>http://visionmasterdesigns.com/tutorial-installing-ruby-on-rails-2-in-windows-vista-xp/</link>
		<comments>http://visionmasterdesigns.com/tutorial-installing-ruby-on-rails-2-in-windows-vista-xp/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 12:09:19 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://blog.visionmasterdesigns.com/?p=35</guid>
		<description><![CDATA[Ruby on Rails is the next "in" thing. This tutorial teaches you step by step to set up Ruby on Rails environment on your local Computer.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-installing-ruby-on-rails-2-in-windows-vista-xp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-installing-ruby-on-rails-2-in-windows-vista-xp%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify;">Greetings,</p>
<p style="text-align: justify;">Most of you must have heard of <span style="color: #000000;"><strong>&#8220;Ruby on Rails (RoR)&#8221;</strong></span>. It being touted as the next best thing (apart from php <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ). Well lemme give you a lowdown of what Ruby on Rails is&#8230;</p>
<p style="text-align: justify;">I`ll try to explain the power of RoR in the simplest of words,</p>
<p>If PHP can do something after typing <strong>75</strong> lines of code, RoR can do the same thing in typing mearly <strong>3</strong> lines of code !!!!<br />
Thats as simple is it gets ! But then again, there is a catch to it, RoR is equally complex. So Today, I`ll just give you the basic idea of what Ruby on Rails is, and how to set up a developer environment for RoR, So next time we can directly start creating applications. woohoo !<br />
<span id="more-35"></span></p>
<p style="text-align: justify;">But Firstly the basics.<br />
If you are aware of the basics then <a href="#down">Click Here</a> to jump below, else read on.</p>
<p style="text-align: justify;">&#8220;<strong><span style="color: #000000;">Ruby</span></strong> is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby was initially developed and designed by Yukihiro &#8220;Matz&#8221; Matsumoto.&#8221;</p>
<ul style="text-align: justify;">
<li> Ruby is very similar to our native object-oriented programming languages (eg: C++,Java).</li>
<li>You can define variables using &#8216;@&#8217; symbol.</li>
<li>You can define functions, more commonly known as methods using
<pre lang="ruby">def method_name
....
end</pre>
</li>
</ul>
<p style="text-align: justify;">&#8220;<strong>Ruby on Rails</strong> is framework developed particularly for web applications. The framework is coded using Ruby. It basically makes our lives easier by generating code automatically on execution of a single piece of code.</p>
<ul style="text-align: justify;">
<li>It uses the MVC Architecture. (Model-View-Controller, I`ll be explainin this in the next tutorial, which will be &#8216;Creating Your First RoR Application&#8217;)</li>
</ul>
<p style="text-align: justify;">I like to tell you that, its not easy deploying a RoR application (Thats right, its an application, not a script or a piece of code, but a combination of lots of directories &amp; files).<br />
Its not anything like the php scripts we upload to the server and run the script by pointing to the right address, there are various modes on how a RoR application is executed (Eg. developer, test, production).</p>
<p>Enough of the technical mumbo-jumbo, lets get down business.<a id="down" name="down"></a></p>
<p style="text-align: justify;">Pre-Requisites :</p>
<ol style="text-align: justify;">
<li>Webserver + MySQL installed</li>
<li><span style="color: #000000;"><strong>Ruby (1.8.6)</strong></span> : We need to install the basic ruby binaries and extensions to execute RoR applications.<br />
Download <a title="ruby186-26.exe" href="http://rubyforge.org/frs/download.php/29263/ruby186-26.exe">ruby186-26.exe</a></li>
</ol>
<p style="text-align: justify;">Basically you must have a normal php/mysql developer environment already installed, if not, you can refer to my earlier tutorial i.e<br />
<a href="http://www.visionmasterdesigns.com/blog/2008/07/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/">Tutorial : Installing Apache, PHP5, MySQL5, PhpMyAdmin 2.11 in Windows Vista/XP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-installing-ruby-on-rails-2-in-windows-vista-xp/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
