Can't get mod_rewrite to work... I want to get rid of /index.php/!

edited July 2012 in Installation
I am struggling in removing the /index.php/ section from my URLs... whatever I do I just seem to get 404 not found error...

http://localhost/~livvy/barbaraolive/index.php/test
works fine

but

http://localhost/~livvy/barbaraolive/test
doesn't!

test.php is a view without a controller, but i have also tried creating a controller & view with no success :(


My file structure looks a bit like:

> assets
> fuel
> application
> .htaccess
> cache
> config
...
> views
...
> test.php

My .htaccess file is as follows (taken from a forum, I am new to using mod_rewrite)

Options +FollowSymLinks

RewriteEngine On
RewriteBase /fuel


Order Deny,Allow
Deny From All

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php/$0 [L]

Comments

  • edited 9:20AM
    Are you sure you have .htaccess enabled on your server along with the mod_rewrite module installed? What kind of server environment are you running (e.g. MAMAP, WAMP, etc).
  • edited 9:20AM
    I'm not using mamp or anything... i'm on mac osx lion using apache2

    as far as i can tell it should be working! i've managed to get mod_rewrite to work on another site i was working on, which was just code igniter, whereas the one I'm having problems with is a fuel cms installation...
  • edited 9:20AM
    Just to confirm, you have a page created in the CMS or a view file named test.php? Also, the CMS has been enabled in the MY_fuel.php config file correct and the fuel_mode has been set to 'auto' (if you are wanting to pull pages from the CMS)?
  • edited 9:20AM
    I'm on the same system as you, no problems.

    Are you sure that RewriteBase is correct? Should be barbaraolive (or maybe even ~livvy/barbaraolive) no?

    My paths don't look like yours though, I don't have the tilde part in mine..
  • edited 9:20AM
    test.php is just a view file

    MY_fuel.php
    $config['fuel_mode'] = 'auto';
    $config['admin_enabled'] = TRUE;


    Lance: i've tried changing RewriteBase unsuccessfully..

    The site is under my home, Sites > barbaraolive which is why I'm using the tilde
  • edited 9:20AM
    Try changing your RewriteBase to:
    RewriteBase /~livvy/barbaraolive/
Sign In or Register to comment.