First of all, I'vre read every question about this kind of topic but except one of them, isn't replied.

I have an Apache 2.2 Server

Server
|-foo
|-bar
|-piz
|-target
 |-www
 |-rest_service

And i'm implementing a PHP-REST Service on /target/rest_service. For it, I'm installing Slim or Tonic Framework, and neither of them works. I studied it for a time, and I think that the problem is because de .htaccess file isn't being readed from Apache, so, Apache doesn't redirect .../rest_service/question/data to .../rest_service/index.php

httpd.conf

...
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
...
<VirtualHost *:8080>
    DocumentRoot "E:\me\workspace\target\rest_service"  
    #ErrorLog "logs/mysite.com-error.log"
    #CustomLog "logs/mysite.com-access.log" combined
RewriteLog "E:\me\workspace\target\rest_service\rewrite.log"
    <Directory "/target/rest_service">  
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

.htaccess on "E:\me\workspace\target\rest_service\" ( from Slim Framework )

RewriteEngine On

# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
#RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

I just want to redirect every path up (!or below) .../rest_service/ to .../rest_service/index.php so .../rest_service/users/7 is being proccesed by .../rest_service/index.php

Lot of thanks

EDIT! - MORE INFO:

server.log

[Thu May 30 10:20:13 2013] [notice] Child 2820: Starting 64 worker threads.
[Thu May 30 10:20:13 2013] [notice] Child 2820: Starting thread to listen on port 8080.
[Thu May 30 10:20:13 2013] [notice] Child 2820: Starting thread to listen on port 80.
[Thu May 30 10:20:13 2013] [notice] Child 2820: Starting thread to listen on port 8888.
[Thu May 30 10:20:13 2013] [notice] Child 4196: All worker threads have exited.
[Thu May 30 10:20:13 2013] [notice] Child 4196: Child process is exiting
[Thu May 30 10:20:18 2013] [error] [client 127.0.0.1] File does not exist: E:/.../rest_service/users/7

rewrite.log -> nothing!

EDIT - Partial Solution!

At the starting point, at the base Directory (localhost/), I have AllowOverride to None, that's the reason why I'm enabling an VirtualHost, to have two different configs. (localhost/[ foo | bar | piz ]) and (localhost:port/).

IF I SET AllowOverride all IT WORKS!, but, I want to have a configuration appart for the rest of the server. Is there any way?

0

There are 0 best solutions below