Welcome Guest, Not a member yet? Register   Sign In
Problem with mod_rewrite: Mac Os.
#1

[eluser]Unknown[/eluser]
Hello friends, I've trying to take away "index.php" from my codeigniter apps URLs. I have already made appropriate changes to make it work, but still does not work.

This is what I've in my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /centroplatero/

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

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

I've changed this line in config.php file:
$config['index_page'] = '';

I've uncommented this lines in httpd.conf file:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
AccessFileName .htaccess

I've configured the .htaccess directives as follows:
<Directory "Library/WebServer/Documents">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig FileInfo
Order deny, allow
Deny from all
</Directory>

I do not if anything is missing. would greatly appreciate your help.
#2

[eluser]tomcode[/eluser]
I guess Your if clause in the .htaccess must be

Code:
<IfModule mod_rewrite.so>
#3

[eluser]Unknown[/eluser]
thanks tomcode, the bug was not in the if clause, but you helped me think about how the module was being loaded, the problem was in the httpd.conf directives.. thanks for your attention and reply buddy...




Theme © iAndrew 2016 - Forum software by © MyBB