Welcome Guest, Not a member yet? Register   Sign In
MAMP remove index.php
#1

[eluser]Rick Blackdog[/eluser]
Hi, have read a few articles and tried various configs but am unable to remove index.php using my .htaccess file on my local machine (mac). This is a new install of MAMP running PHP 5.3 & apache 2.0.63.

My apache config has this line...
Code:
LoadModule rewrite_module modules/mod_rewrite.so

Here's my .htaccess file which is in the root directory (along with system & application).

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    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>
#2

[eluser]duellsy[/eluser]
Might just be

Code:
RewriteBase /

If you have your project in a subfolder you'll need to specify it there e.g.,

Code:
RewriteBase /mysite/
#3

[eluser]Rick Blackdog[/eluser]
Damn, you're right.... thanks!
#4

[eluser]duellsy[/eluser]
awesome, go crazy!




Theme © iAndrew 2016 - Forum software by © MyBB