# [SOLVED] Problems with mod_rewrite on apache2 + php-fpm

## oliwel

Hi Folks,

I want to migrate a LAMP with mod_php to apache / fastcgi / fpm - I tried out the howto at http://mattmcadoo.com/content/mini-howto-setting-php-fpm-apache-gentoo which works but I cant get my rewrite stuff to work =(

I have a ZendFramework MVC App that does url rewriting using 

```

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^.*$ index.php [L]  

```

After migration to the fpm server, I just see a plain message "File not found".

As I get a 500 Server Error when I pull down the FPM Server, it seems like the rewrite works correctly and passes the url to the fpm processor. I also tried 

```
RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?/$1 [L] 

```

which has the same result. In the rewrite log I see the rewrite happen with a last line of

```
internal redirect with /index.php/login/ [INTERNAL REDIRECT]
```

 where login is the originating url path.

Anybody can help me out?

OliverLast edited by oliwel on Sat Jul 14, 2012 1:24 pm; edited 1 time in total

----------

## oliwel

Problem is solved - it was not the rewrite but a missing "short_tag" option in the new fpm php.ini file. So the files where correctly passed to fpm but due to the short tags used they were not parsed.

----------

