title: How to use .htaccess in WAMP Server?
body: <p>I searched in web for 2 days and I try to use htaccess in my local wamp but I can't! I know there is something wrong but I don't know where...</p>
  
  <p><strong>First:</strong> I activated "<em>rewrite_module</em>" in the apache menu, then I checked the phpinfo page and I saw that module added to its "<em>Loaded Modules</em>" part.</p>
  
  <p><strong>Second:</strong> I checked the httpd.conf and made some changes, it is the result (just important parts):</p>
  
  <pre><code>ServerRoot "c:/program Files/wamp/bin/apache/apache2.2.11"
  Listen 80
  ServerName localhost:80
  DocumentRoot "c:/program Files/wamp/www/"
  
  &lt;Directory /&gt;
  Options FollowSymLinks
  # AllowOverride None
  # Order deny,allow
  # Deny from all
  AllowOverride all
  Order Allow,Deny
  Allow from all
  &lt;/Directory&gt;
  
  &lt;Directory "c:/program Files/wamp/www/"&gt;
  Options Indexes FollowSymLinks
  AllowOverride all
  Order Allow,Deny
  Allow from all
  &lt;/Directory&gt;
  
  LoadModule alias_module modules/mod_alias.so
  LoadModule rewrite_module modules/mod_rewrite.so
  </code></pre>
  
  <p><strong>Next:</strong> I made an alias to my workspace. Here is contents of its .conf file:</p>
  
  <pre><code>Alias /basic_test/ "e:/Projects/basic_test/"
  
  &lt;Directory "e:/Projects/basic_test/"&gt;
  Options Indexes FollowSymLinks MultiViews
  AllowOverride all
  Order allow,deny
  Allow from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p><strong>Next:</strong> I place a simple "index.php" and "test.php" in my workspace root and tested the alias by this addresses:
  --> "<em>localhost/basic_test/index.php</em>"
  --> "<em>localhost/basic_test/test.php</em>"
  They worked perfectly...</p>
  
  <p><strong>Finally</strong>, I added a ".htaccess" file to the root of my workspace (beside index.php), and I wrote in it:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on
  RewriteRule ^index.php$ test.php
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>But the <strong>problem</strong> occurred when I tried to test the "<code>.htaccess</code>" by this address:
  --> "<em>localhost/basic_test/index.php</em>"</p>
  
  <p>It shows an error page with this message:</p>
  
  <blockquote>
    <p>Oops! This link appears to be broken.</p>
  </blockquote>