i've searched a lot but i didn't find the answer. This is my folder structure in my shared host:
- api.subdomain
- index.php
- .htaccess
- ...
- public_html
- index.html
- ...
So when I go to http://example.com it loads Vuejs and my api is in http://api.example.com
The problem is that when I reload a page i.e. http://example.com/news (or enter manually to a link), it gives me a 404 Not found. I read in Vuejs documentation this:
Since our app is a single page client side app, without a proper server configuration, the users will get a 404 error if they access http://oursite.com/user/id directly in their browser.
And they let this config:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
But symfony autogenerated this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
# Sets the HTTP_AUTHORIZATION header removed by Apache
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</IfModule>
I don't know how to "merge" them and I don't understand how can I do if the apps are in different root directory. I tried a lot of things but none worked
Hopefully someone can help me. Thanks!