• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.