Welcome Guest, Not a member yet? Register   Sign In
.htaccess in Snow Leopard.
#1

[eluser]ronn[/eluser]
I'm attempting to get my CI code working on my local mac machine for development. The test app runs great on a Godaddy remote host. I'm running snow leopard and having trouble with CI urls. I have followed a tutorial to get Apache to recognize the .htaccess file in my directory. I believe it is working, but I don't have any way to know for sure. Here is what my .htaccess file looks like.

Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cal
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

I have changed the following like in the project
Code:
$config['base_url'] = "http://localhost/~ronn/test/";
$config['index_page'] = "";
$config['uri_protocol']    = "REQUEST_URI";

the url http://localhost/~ronn/test/index.php/welcome
works great, but

http://localhost/~ronn/test/welcome

gives me a page not found. Any suggestions?
#2

[eluser]bretticus[/eluser]
First, change this line:

Code:
$config['uri_protocol']    = "REQUEST_URI";

to
Code:
$config['uri_protocol']    = "AUTO";

Check your apache config for this line:

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

If it's missing or commented out, fix it.

If that already works, just download MAMP and save yourself the trouble. Smile




Theme © iAndrew 2016 - Forum software by © MyBB