I have a website hosted in /var/www/thesite(Apache server), this is a website Symfony2, so inside this folder I have a folder webthat my virtual host points to.
So my virtual host www.mysite.com -> /var/www/thesite/web
In this web folder, I have a .htaccessURL for convenient formatting.
Now I have added the API in /var/www/thesite/api, the API is implemented using Silex. I want to redirect the entire request http://www.mysite.com/apito this new structure.
So I added in /var/www/thesite/web/.htaccess
RewriteCond %{REQUEST_URI} ^/api
RewriteRule ^api(.*)$ ../api/web/index.php [NC,QSA,L]
But I get:
Invalid request
Your browser sent a request that this server could not understand.
I'm not sure if I can access the parent folder in .htaccess. I do not want to change my target virtualhost directory to avoid a security breach.
?