In 2016/17 I had XAMPP working good but then I had one year rest and needed to reinstall Windows 10 and when I attempted to open the control panel it would not open.
I then decided to download the latest version of XAMPP and also CodeIgniter. I have transferred all of the files from the old version to the new version. I am able to open http://localhost/phpmyadmin and I have created a database with a table similar to that I had before. But if I enter http://localhost/intro I get the result of Object not found! - Error 404. I have checked routes.php and everything appears OK and I've also placed the Intro file (which is simple text without reference to the database) in the root folders of Controllers & Views, but get the same result. I have also checked config.php and changed $config['base_url'] = 'http://localhost/'; to $config['base_url'] = 'http://127.0.0.1:8080/localhost/'; but again it made no difference. I also changed the port number in the Control Panel to 8080 but again made no difference.
I guess by being able to open http://localhost/phpmyadmin that indicates Apache is working OK.
Can somebody tell me where else I can check?
If you are sure xampp is running perfectly then add .htaccess file in the main directory of the intro, add the following code into it:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$1 [PT,L]
and try again. If you got any error let me help you.
My old system had a .htaccess file and there was not one in my new system. I copied & pasted that file and everything works good now.
My file contained the following.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
Header add Access-Control-Allow-Origin "*"
Related
Let me inform you this first. This application is working pretty fine on live server currently, however we needed to move it to a different server with a different domain.
Issue is: It gives 404 error on every other page except for index. Loading through index.php works fine.
For an example:
www.test.com/main/login //This gives 404 error
www.test.com/main/index.php/login //This loads fine
Because everything is working fine currently, I made changes only in $config['base_url'] and in database config file. There have been no other changes in any of the files.
Also, this solution provided by somebody in a different questions is already tried out and this doesn't work. Solution is to create .htaccess file with below code & setting $config['index_page']='' :
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Current server is VPS & provider is GoDaddy. New server is Shared hosting and provider is GoDaddy. I'm not getting the root cause of this happening, can somebody point out to the possible solution?
EDIT
I'm attaching a screenshot for an error, it's not typical 404 error page. In case this helps.
For Godaddy, you need to alter this 2 things.
In your .htaccess file, replace
RewriteRule ^(.*)$ index.php/$1 [L]
With the following:
RewriteRule ^(.*)$ index.php?/$1 [L]
Then is your application/config/config.php :
$config['index_page'] = '';
Both this changes should help you resolve your issue.
I was using the following configuration in .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
It was working fine and the home page was displayed as soon as I entered www.my-site.com.
Then I tried to implement prerender.io in codeigniter using the .htaccess file provided in this link: https://gist.github.com/thoop/8072354. The new .htaccess file is as follows:
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "MY_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
<IfModule mod_proxy_http.c>
RewriteCond %{HTTP_USER_AGENT} baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator [NC,OR]
RewriteCond %{QUERY_STRING} _escaped_fragment_
RewriteRule ^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff))(.*) http://service.prerender.io/http://www.my-site.com/$2 [P,L]
</IfModule>
</IfModule>
I also tried the comment of #benceg just below the post but this also did not work:
RewriteRule ^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent))(index\.php)?(.*) http://service.prerender.io/%{REQUEST_SCHEME}://%{HTTP_HOST}/$3 [P,L]
The above .htaccess file did not work, and worse yet, when I replaced my previous (the one mentioned at the beginning) fully working .htaccess file back, it was also not working.
When I entered www.my-site.com, it showed me “Website under construction”.
Then I tried www.my-site.com/mycontroller and, to my surprise, my home page was being shown. This clearly indicates that my .htaccess file (which was previously fully working) is now “partially” working.
But again when I tried www.my-site.com, it showed “Website under construction”.
Some codeigniter configurations that I currently have:
$config['base_url'] = 'http://www.my-site.com/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
$route['default_controller'] = 'mycontroller';
I am using Bluehost Shared Hosting service and I know they support mod-rewrite.
I do not want prerender.io anymore. What did I enable or disable while trying the new (prerender.io version) .htaccess? What can I do to get my fully working "previous state" back?
I tried to search the net for similar issues but did not find anything specific to my problem.
Update:
I tried using the first (previously working) .htaccess file on local lampp server and it is working as usual but it is still not working on Bluehost server.
Update 2:
An interesting finding I made today. When I am checking my site's (address: northernschoolofmusic.com.cp-in-13.webhostbox.net) speed on Google, the page is being rendered correctly. But when I am accessing the above mentioned link in a browser I am instantly redirected to http://northernschoolofmusic.com.cp-in-13.webhostbox.net/cgi-sys/defaultwebpage.cgi .
The problem was finally the internet connexion. The Internet Provider may have saved the DNS incorrectly and redirected to a wrong cached page.
Changing the browser or the connexion provider was the solution !
use this htaccess -
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
and config settings should be like that
$config['base_url'] = 'http://www.my-site.com/';
$config['index_page'] = '';
please follow this it will work...
I'm sorry about my tittle. I'm not sure how I can categorize this question.Please do edit if necessary-Thanks
Here is the issue I'm having:
http://domain.com is my main server- in this main server I'm listing all of the downloadable files I have from another server which is http://myfilehost.com.
on http://domain.com I list my files like so:
download myfile document
download all myfile
The first link is working perfectly fine but when it comes to the zip file I always get the ff error which is really weird:
Here is the htaccess of http://myfilehost.com which I think is the default of wp as its also a wp website not sure if this is hosted on hostgator/bluehost:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
And o I think this is also worth mentioning:
When I try to go to http://myfilehost.com first and wait for it to load then add the directory /downloads/myfile.zip to the URL its actually working perfectly and downloading myfile.zip..
Thank you Everyone for your kindness of helping me and giving me a response
I have never used CodeIgniter before, let alone ANY php framework and I thought I would give it a try. Everything is going fine except I cannot seem to remove the index.php from the URL and still access my pages.
I have never used the MVC structure so I am learning as I go, so forgive me if I'm doing this wrong.
I am trying to access a view I created called 'about_page.php' by simply typing in localhost/ci/about but currently I can only access it by using localhost/ci/index.php/about
The controller for the page is: /application/controllers/about.php
The Model for the page is: /application/models/about_model.php
And the View for the page is: /application/views/about_page.php
I have searched for a solution to this issue, but haven't been able to find one. Here is where I have already searched:
CodeIgniter - removing index.php
Codeigniter - how to remove the index.php from url?
http://www.farinspace.com/codeigniter-htaccess-file/
CodeIgniter comes with a .htaccess file in the 'application' folder which contains only Allow Deny From All. So I created a new .htaccess file in the root directory, http://localhost/ci/.htaccess and added this code to it:
RewriteEngine On
RewriteBase /ci
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
When the .htaccess file is in the root directory I get a 500 Internal Server Error. When I copy the exact same file into the applications folder the 500 error goes away, but I still cannot access the about page by using localhost/ci/about
I have already changed $config['index_page'] = 'index.php'; to $config['index_page'] = ''; AND I tried changing $config['uri_protocol'] = 'AUTO'; to $config['uri_protocol'] = 'REQUEST_URI'; but I am still getting the Internal Server Error.
I went into the httpd.conf file and uncommented the mod_rewrite.so module so I know mod_rewrite is active.
Does anyone have any ideas why this isn't working or how I can get this work? I know there are alot of questions on StackOverflow on this subject but I couldn't find one that answered my question.
Am I doing this right? Should I even be able to access the about page by visiting localhost/ci/about or do I have to create an 'about' directory in the 'application' directory?
There are 3 steps to remove index.php.
Make below changes in application/config.php file
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/Your Ci folder_name';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
Make .htaccess file in your root directory using below code
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Enable the rewrite engine (if not already enabled)
i. First, initiate it with the following command:
a2enmod rewrite
ii. Edit the file /etc/apache2/sites-enabled/000-default
Change all AllowOverride None to AllowOverride All.
Note: In latest version you need to change in /etc/apache2/apache2.conf file
iii. Restart your server with the following command:
sudo /etc/init.d/apache2 restart
Your .htaccess is slightly off. Look at mine:
RewriteEngine On
RewriteBase /codeigniter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt|css|docs|js|system)
RewriteRule ^(.*)$ /codeigniter/index.php?/$1 [L]
Notice "codeigniter" in two places.
after that, in your config:
base_url = "http://localhost/codeigniter"
index = ""
Change codeigniter to "ci" whereever appropriate
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dmizone_bkp
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt|css|docs|js|system)
RewriteRule ^(.*)$ /dmizone_bkp/index.php?/$1 [L]
</IfModule>
This works for me
Move your .htaccess file to root folder (locate before application folder in my case)
RewriteEngine on
RewriteBase /yourProjectFolder
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
Mine config.php looks like this (application/config/config.php)
$config['base_url'] = "";
$config['index_page'] = "index.php";
$config['uri_protocol'] = "AUTO";
Let me know if its working for you guys too ! Cheers !
I am using something like this - codeigniter-htaccess-file, its a good article to begin with.
leave the .htaccess file in CI root dir
make sure that mod_rewrite is on
check for typos (ie. controller file/class name)
in /application/config/config.php set $config['index_page'] = "";
in /application/config/routes.php set your default controller $route['default_controller']="home";
If you are running clean installation of CI (2.1.3) there isn't really much that could be wrong.
2 config files
controller
.htaccess
mod_rewrite
read
Codeigniter .htaccess
redirect-index-php-in-codeigniter
For those users of wamp server, follow the first 2 steps of #Raul Chipad's solution then:
Click the wamp icon (normally in green), go to "Apache" > "Apache modules" > "rewrite_module". The "rewrite_module" should be ticked! And then it's the way to go!
if not working
$config['uri_protocol'] = 'AUTO';
change it to
$config['uri_protocol'] = 'PATH_INFO';
if not working change it to
$config['uri_protocol'] = 'QUERY_STRING';
if use this
$config['uri_protocol'] = 'ORIG_PATH_INFO';
with redirect or header location to url not in htaccess will not work you must add the url in htaccess to work
I had similar issue on Linux Ubuntu 14.
After constant 403 error messages in the browser and reading all answers here I could not figure out what was wrong.
Then I have reached for apache's error log, and finally got a hint that was a bit unexpected but perfectly logical.
the codeIgniter main folder had no X permission on folder rendering everything else unreadable by web server.
chmod ugo+x yourCodeIgniterFolder
fixed first problem. Killed 403 errors.
But then I started getting error 500.
Culprit was a wrong settings line in .htaccess
Then I started getting php errors.
Culprit was same problem as main folder no X flag for 'others' permission for inner folders in application and system folders.
My two cents for this question: READ Apache Error.log.
But, also be aware of security issues. CodeIgniter suggests moving application and system folder out of web space therefore changing permissions shall be taken with a great care if these folders remain in web space.
Another thing worth mentioning here is that I have unzipped downloaded CodeIgniter archive directly to the web space. Folder permissions are likely created straight from the archive. As given they are secure, but folder access issue (on unix like systems) is not mentioned in CodeIgniter manual https://codeigniter.com/user_guide/installation/index.html and perhaps it shall be mentioned there with guidelines on how to relax security for CodeIgniter to work while keeping security tight for the production system (some security hints are already there in the manual as mentioned beforehand).
Just add this in the .htaccess file:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA]
By default the below sits in the application folder, move it like suggested into the root dir.
leave the .htaccess file in CI root dir
Open the application/config/config.php file and make the changes given below,
set your base url by replacing the value of $config['base_url'], as
$config['base_url'] = 'http://localhost/YOUR_PROJECT_DIR_NAME';
make the $config['index_page'] configuration to empty as $config['index_page'] = '';
Create new .htaccess file in project root folder and use the given settings,
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|assets|images|js|css|uploads|favicon.png|favicon.ico|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Restart the server, open the project and you'll be good to go.
Can someone help me with this? I'm feeling like I've been hitting my head against a wall for over 2 hrs now.
I've got Apache 2.2.8 + PHP 5.2.6 installed on my machine and the .htaccess with the code below works fine, no errors.
RewriteEngine on
RewriteCond $1 !^(index\.php|css|gfx|js|swf|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
The same code on my hosting provider server gives me a 404 error code and outputs only: No input file specified. index.php is there. I know they have Apache installed (cannot find version info anywhere) and they're running PHP v5.2.8.
I'm on Windows XP 64-bit, they're running some Linux with PHP in CGI/FastCGI mode. Can anyone suggest what could be the problem?
PS. if that's important that's for CodeIgniter to work with friendly URLs.
Update1:
mod_rewrite is installed and on.
What I've noticed is that if I change in RewriteRule to /index.php?$1 (question mark instead of forward slash) it goes into an infinite loop. Anyway, using question mark isn't an option as CodeIgniter (required) is not going to work this way.
Homepage also works when I request index.php directly: example.com/index.php
I'm starting to think it might be apache thinking that once the trailing slash is added it is not a file anymore but a folder. how to change such a behaviour?
Update 2:
I was wrong.
Apache handles these URLs correctly.
Requesting http://example.com/index.php/start/ (homepage) or any other valid address works.
Seems that Apache is just not forwarding the query for some reason.
Update 3:
Just to be clear what I'm trying to achieve.
I want to rewrite addresses like that:
http://www.example.com/something/ => http://www.example.com/index.php/something/
http://www.example.com/something/else/ => http://www.example.com/index.php/something/else/
I was beating my head up against this as well. I'm also installing Code Igniter.
The goocher was no RewriteBase. Here's my .htaccess:
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
The Problem
I encountered a similar problem just now and unfortunately none of the answers in this thread helped:
Zend Framework was giving out "No input file specified.", but:
The default RewriteBase was just fine, and adding RewriteBase / did not help
It's a shared hosting server and only FastCGI is available (no ability to switch to SuPHP)
AcceptPathInfo was on
There was no problem with URL rewriting in general on the server
So the answer came from the following site:
https://ellislab.com/forums/viewthread/55620/P15 [dead link]
(even though the host is not DreamHost).
The Solution
Apparently all you need to do is replace this line:
RewriteRule ^(.*)$ index.php/$1
With this:
RewriteRule ^(.*)$ index.php?/$1
Problem solved.
This worked for me:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
After index.php, the question mark is important!
Try if it works with a simpler RewriteCond; like one that rewrites only everything that isn't an existing file/folder/link:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ /index.php/$1 [R,L]
Go Daddy Users:
login to your Go Daddy Account
click on your hosting account.
go to Settings > File Extensions Management
change .php and .php5 to run under PHP5.2X (instead of PHP5.2xFastCGI)
SOLVED!!!!
mod_rewrite is a bit too smart for its own good, because it tries to figure out what sort of redirect it should be doing. In this case it looks to mod_rewrite like you're trying to redirect to a folder, so it looks for the folder and can't find it, hence the error.
Edit: Just to be perfectly clear I think your best bet is to change your rewrite rule to:
RewriteRule ^(.*)$ /index.php?$1 [L]
unless there is a very speciic reason why you want it to be a forward slash.
Edit 2: I see that you already tried this. The reason you're getting an infinite loop is because you have index.php in your rewrite condition. If you remove that you should be free of the infinite loop.
this code will fixed this issue.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
.htaccess for Live Server :-
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
.htaccess for Localhost :-
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1
It is very likely that the administrator of your host has disabled the ability to use Rewrite in .htaccess. They might not even have mod_rewrite installed.
Drop them an email and ask
Since this is a server configuration issue, perhaps you should ask at Server Fault
Edit (since you are sure that the server is configured correctly)
Have you considered tagging your RewriteCond with an end of line $?
RewriteCond $1 !^(index\.php|css|gfx|js|swf|robots\.txt|favicon\.ico)
Will (based on my limited knowledge) block any url that contains index.php, css, gfx ... at the start of a url. Because you don't have a $ at the end of the regexp, it will also block any urls that continue on from there...
I.e www.yourdomain.com/index.php/something is not redirected, same with www.yourdomain.com/js/something
Perhaps you want to add a $, which will require the url to end immediately after your regexp.
RewriteCond $1 !^(index\.php|css|gfx|js|swf|robots\.txt|favicon\.ico)$
Here is one time I caught no input file specified right on action:
This causes it:
RewriteRule ^(.*\.swf)$ redirect_php.php/?a=1 [last]
This corrected it:
RewriteRule ^(.*\.swf)$ redirect_php.php?a=1 [last]
note the / before query ?
This seems really related to AcceptPathInfo, which is about the ability to read paths after file names:
http://domain.com/file.php/tricky_path/?regular_query_stuff
Since this question seems to attract a lot of attention I'd like to propose another answer for people having encountering the same problem and are unable to solve it with the help of the existing answers. I myself was one of those people until five minutes ago.
Always, I mean always check your server logs because they might present useful information to you.
After checking my server logs (Apache2.4) I found out that open_basedir caused the trouble:
mod_fcgid: stderr: PHP Warning: Unknown: open_basedir restriction in effect. File(/data/sites/domain/public/index.php) is not within the allowed path(s): (/usr/local/lib/php:/usr/local/bin:/data/sites/domain/http-docs) in Unknown on line 0
mod_fcgid: stderr: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
In this case, open_basedir could not handle a symbolic link I created because it points to the outside of the open_basedir settings. Either broaden the open_basedir setting to also the new location or move the required files to the inside of any allowed directory..
You may be using Nginx, not an Apache. The error message will be the same.
echo out your sever data to be sure.
echo $_SERVER["SERVER_SOFTWARE"];
I spent hours trying all recipes from SO until I found the solution: you have to add question mark (?) after ".php", so last line of your rewrite rules will look like:
RewriteRule ^(.*)$ index.php ? /$1 [L]
There was no ? In my CodeIgniter setup from previous server, cause it usedpure Apache (no Nginx). And no recipes with port forwarding, nginx reconfiguration or php-fm reinstallation helped -- I tried them all on my VDS.
That simple method solved all in seconds.
In my case, the rewrite engine was conflicting with the doc_root directive in php.ini. The rewrite engine was treating the rewritten URL as a local file path and prefixing it with the document root, only to be prefixed again by PHP.
The solution was to rewrite to a relative URL, and add the PT flag. This tells mod_rewrite to pass the result to normal URL processing.
RewriteRule "^/(unwanted-part)/(.*)$" /$2 [PT]
In my case I am running laragon it's happening due to php.ini file, then I removed the php and install it again and it worked successfully. I think made some changes in php.ini file that's why it's displaying no input specific. After installing php.ini it fixed my issue.
update php.ini
Maybe your server has AcceptPathInfo disabled that is essential for that kind of URL to work properly. Try to enable it:
AcceptPathInfo On
Ok, try this rule:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !^index\.php(/|$) index.php%{REQUEST_URI} [L]