On the server I have the following structure:
public_html
->wp
->project
->app
->src
->web
Where wp is a wordpress website and project is a symfony2 applicatiomn. The intention is that www.domain.com/project gives me the symfony2 application, where all other urls (without /project) go to the wordpress site.
In order to achive this, I have the following htaccess files:
public_html:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
public_html/project:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{HTTP_HOST} ^project.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.project.com$
RewriteCond %{REQUEST_URI} !^web/
RewriteRule (.*)$ web [L]
</IfModule>
public_html/project/web:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/app.php [L]
</IfModule>
So my application works but there is a redirect to www.domain/com/project/web visible, and that is what I want to hide! Please advice as I seem to lack htaccess knowledge to achieve this.