title: Pretty URL's with CodeIgniter
body: <p>I'm fairly new to CI and have been trying out how to produce clean URL's. I have accomplished this task before without using a framework by editing my .htaccess file as follows.</p>
  
  <pre><code>RewriteCond %{REQUEST_URI} !^/(css|js|img)/
  RewriteRule ^profile/([^/]*)$ profile.php?id=$1 [L]
  </code></pre>
  
  <p>With CI, I have tried the following:</p>
  
  <pre><code>#Get rid of the index.php that's in the URL by default
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L]
  
  # Profile page
  RewriteCond %{REQUEST_URI} !^/(css|js|img)/
  RewriteRule ^profile/([^/]*)$ profile?id=$1 [L]
  </code></pre>
  
  <p>I know that by default, the value after the name of the controller in the URL (in this case, the Profile controller), will invoke the function with the same name inside the controller class. But, if there is no value in the URL specified after the controller, by default, the index function will be invoked. I plan on leaving the function name blank so that the index function will be invoked by default. But, the rewrite rule isn't working.</p>
  
  <p>Any ideas?</p>