CodeIgniter ModRewrite for Dreamhost

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 (3)

  1. Eliseu says:

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

    como instalar

  2. mikke says:

    不错的主题

  3. xiao3 says:

    Nice theme ~ I like it ~

add your comment