getting error 500 with .htaccess when pointing an existing file / folder (mod_rewrite)

Posted by Leto on Stack Overflow See other posts from Stack Overflow or by Leto
Published on 2012-10-16T10:58:27Z Indexed on 2012/10/16 11:00 UTC
Read the original article Hit count: 170

Filed under:
|
|

i made a simple .htaccess file to expose the problem.

I want that all request made to the folder redirect to a subfolder file "app/index.php"

RewriteEngine On

RewriteRule (.*) app/index.php [QSA]

And this works fine on with the basic url of my hoster (like http//myname.hosting.com/htaccessFolder

The problem is that i have a domain pointing on this folder, and when accessed to it, server return Internal Server Error 500.

If i do this :

RewriteEngine On

RewriteRule (.*) somefile.php [QSA]

Redirection works only when file does not exists (404 not found error occured). when the file exists i get a 500 error too.

I've asked the hosting support without success for the moment..

© Stack Overflow or respective owner

Related posts about apache

Related posts about .htaccess