CodeIgniter problem with .htaccess. Old issue raised again

apps

#1

DH has some issues with CodeIgniter .htaccess.

I red menu forums where people talk about that issue and offer the working solution.

This page for example:
http://codeigniter.com/wiki/Dreamhost_.htaccess/

But that does not help us. We tried all varieties. Here is an example of the last one:

Options +FollowSymLinks
RewriteEngine on
RewriteCond $1 !^(index.php|img|public|robots.txt|css|deals|cgi-bin)
RewriteRule ^(.*)$ /index.php?/$1 [L]

in config file we set:
$config[‘uri_protocol’] = “AUTO”;

we tried $config[‘uri_protocol’] = “QUERY_STRING”;
and $config[‘uri_protocol’] = “REQUEST_URI”;

That still that does not work. All privius toturials discribe old CI verson, we use the last one 1.7.2

There is other question what should i set FastCGI or CGI for domain?
I tried both…

Please help!

Thanks


#2

Same issue here.

My post-commit uses the following:

#!/bin/bash
wget --http-user=<username> --http-passwd=<password> -qO - http://<site>/cgi-bin/pri/do_update.cgi

Which works fine. But when I use mod_rewrites to get rid of the index.php in the URL it is failing. My .htaccess file:

#Stop people from viewing in the .svn directory.
RedirectMatch 403 /\.svn

#remove index.php from URL
RewriteEngine on
RewriteCond $1 !^(index\.php|cgi-bin|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

As you can see it has the cgi-bin in the exclude list. Except the post-commit line quits working.


#3

Update: FIXED

Keep everything the same as I noted above:

  1. Setup post-commit: http://wiki.dreamhost.com/Subversion#Automatic_Post-commit_Checkout
  2. Add .htaccess file to web root: http://codeigniter.com/user_guide/general/urls.html
  3. Edit .htaccess and add stats part: http://wiki.dreamhost.com/Making_stats_accessible_with_htaccess

Don’t forget to do an initial SVN CO in your web root: /usr/bin/svn update /home//

When done, post-commit:

#!/bin/bash
wget --http-user=svnUpdater --http-passwd=updaterPassword -qO - http://wallaholics.ever-flow.net/cgi-bin/pri/do_update.cgi

Web root .htaccess:

#required for post-commit to work with rewrite rules below
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html).*$ [NC]
RewriteRule . - [L]

#Stop people from viewing in the .svn directory.
RedirectMatch 403 /\.svn

#remove index.php from URL
RewriteEngine on
RewriteCond $1 !^(index\.php|cgi-bin|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]