[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?