Welcome Guest, Not a member yet? Register   Sign In
CI + Leopard + htaccess - index.php = Impossible?
#1

[eluser]TheLoops[/eluser]
Did anybody of you manage to get rid of the "index.php" in the URL using htaccess on Mac OS X 10.5 Leopard?

Everything is working fine with my localhost testing server, except the htaccess rewriting.

These are some excerpts from my setup:

etc/apache2/httpd.conf:
Code:
#This is factory default:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
. . .
#This might not be factory default, not sure, though:
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>
. . .
#This is factory default:
<Directory "/Library/WebServer/Documents">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

etc/apache2/users/username.conf:
Code:
<directory "/Users/username/Sites">
    Options Indexes MultiViews Includes FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from localhost    
    #Order allow,deny
    #Allow from all
</directory>

NameVirtualHost *:80

<virtualhost *:80>
    DocumentRoot /Users/username/Sites/website/web_root
    ServerName offline-website
</virtualhost>

/Users/username/Sites/website/web_root/.htaccess:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

Whenever I remove the "index.php" from the URL I get 404:
Code:
404 Page Not Found
The page you requested was not found.

The site's web root is at:
/Users/username/Sites/website/web_root/

The site's application is at:
/Users/username/Sites/website/application/

The CI system is at:
/Users/username/Sites/system/

What the heck am I doing wrong here?


Messages In This Thread
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-19-2008, 04:28 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-19-2008, 04:42 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-19-2008, 04:56 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-19-2008, 06:10 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-19-2008, 06:36 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-19-2008, 10:26 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-19-2008, 11:07 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 01:07 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 03:31 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 06:08 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 07:59 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 08:48 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 08:50 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 08:55 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 08:59 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 03:29 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 04:04 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 04:09 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 05:38 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 05:47 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-20-2008, 06:46 PM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-21-2008, 12:21 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-29-2008, 11:38 AM
CI + Leopard + htaccess - index.php = Impossible? - by El Forum - 05-29-2008, 02:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB