Welcome Guest, Not a member yet? Register   Sign In
Mod rewrite HELP for Mac's Snow Leopard
#1

[eluser]AdonisSMU[/eluser]
Ok so I am playing with my CI installation on Snow Leopard OS trying to get rid of the index.php from my url string...

I make sure my mod rewrite is turned on then I proceed to and I check my apache2.2 installation
Code:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule bonjour_module     libexec/apache2/mod_bonjour.so
LoadModule php5_module        libexec/apache2/libphp5.so

Code:
# AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

Then I proceed to go into my config file for CI

Code:
$config['base_url']    = "http://localhost/~Chris/ci/";
$config['index_page'] = "";
$config['uri_protocol']    = "AUTO";

When I changed the uri_protocol to REQUEST_URI I got a 404 page error. When I left it on auto I get ....

Quote:Not Found

The requested URL /~Chris/ci/login was not found on this server.

I put the .htaccess inside my ci folder just outside of my application folder. Here is the code for the .htaccess file...

Code:
RewriteEngine on
RewriteBase /~Chris/ci/
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

I've looked....

http://codeigniter.com/wiki/FAQ
and in the regular user guide
and on several sites and all over this board and have found nothing that works yet. Could you all please help me out here?

Thanks!

Chris
#2

[eluser]wiredesignz[/eluser]
The leading forward-slash in the RewriteRule makes the server load from the root directory, rather than your RewriteBase. Try:
Code:
RewriteRule ^(.*)$ index.php?/$1 [L]
#3

[eluser]AdonisSMU[/eluser]
It's still giving me this...

Quote:Not Found

The requested URL /~Chris/ci/login/ was not found on this server.

I have attached the apache error log

Code:
[Thu Nov 12 08:34:23 2009] [notice] caught SIGTERM, shutting down
[Thu Nov 12 08:34:28 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist
Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist
mod_bonjour: Skipping user 'Chris' - cannot read index file '/Users/Chris/Sites/index.html'.
[Thu Nov 12 08:34:30 2009] [notice] Digest: generating secret for digest authentication ...
[Thu Nov 12 08:34:30 2009] [notice] Digest: done
[Thu Nov 12 08:34:30 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 PHP/5.3.0 configured -- resuming normal operations
[Thu Nov 12 08:42:38 2009] [notice] caught SIGTERM, shutting down
[Thu Nov 12 08:42:43 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist
Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist
mod_bonjour: Skipping user 'Chris' - cannot read index file '/Users/Chris/Sites/index.html'.
[Thu Nov 12 08:42:44 2009] [notice] Digest: generating secret for digest authentication ...
[Thu Nov 12 08:42:44 2009] [notice] Digest: done
[Thu Nov 12 08:42:44 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 PHP/5.3.0 configured -- resuming normal operations
#4

[eluser]AdonisSMU[/eluser]
Can someone please help me out? Maybe someone could direct me to an IRC chat... I refuse to give up on this until I figure it out.
#5

[eluser]AdonisSMU[/eluser]
Here are some more errors that Iam getting...

[Thu Nov 12 10:59:01 2009] [error] [client ::1] File does not exist: /Users/Chris/Sites/ci/site
[Thu Nov 12 10:59:04 2009] [error] [client ::1] File does not exist: /Users/Chris/Sites/ci/site
#6

[eluser]BrianDHall[/eluser]
I'm thinking /Users/Chris/Sites/ci/site does not exist.

If you user something like /path it needs to be your full path from root of your server. Do you have root access? If so you should ssh in and become super-user and check what the full real path is.

My rewrite rules don't use a rewrite base, so you might be sure you really need it for your host to save yourself some time.
#7

[eluser]AdonisSMU[/eluser]
Thanks guys for responding.

It doesn't exist. That's exactly correct. I have root access.

I get the same error regardless if I have a rewrite base or not. I took it out to try and see what would happen.
#8

[eluser]AdonisSMU[/eluser]
Hmmm.. Let me see here...
#9

[eluser]DougW[/eluser]
I am getting the exact same problem with my local installation of Snow Leopard. The default controller comes up just fine by my login controller does not. This is the exact same code that used to run on Leopard with the exact same directory structure.

My theory is that I must have things set up properly or the default controller wouldn't work. Any other controller I try to load results in "The requested URL /xxxxx was not found on this server" message.

I also have several Centos servers on which this runs correctly. Very strange. Maybe it is a php 5.3 thing?

If anyone has shed any light on this please step up.
#10

[eluser]Unknown[/eluser]
@DougW: I have the same problem with Snow Leopard and the Akelos Framework! Have you found a solution?

You could make me very happy ;-)




Theme © iAndrew 2016 - Forum software by © MyBB