CodeIgniter ModRewrite for Dreamhost

12:16 PM Mar 29th 2010 from web under , ,

Recently I began diving head first into CodeIgniter, a PHP MVC framework. During the installation process I ran into a major problem with URL rewriting within the CodeIgniter environment and Dreamhost.

CodeIgniter provides an .htaccess solution to create friendly URLs. Which in most cases works very well. However, with Dreamhost this solution does not work. The follow is what your .htaccess file should look like.

1
2
3
4
5
6
7
8
9
10
11
DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

Reader Comments

Show all comments
  1. xiao3 says:

    Nice theme ~ I like it ~

  2. mikke says:

    不错的主题

  3. Eliseu says:

    olá pessoal por favor como poderei instalar o twitterpress sem um mysql?

    como instalar

Leave a Reply