Problem serving another app from Wordpress subfolder

I have a wordpress site running at the root of my domain. for example http://www.example.com

, since i need a site to run www url. I changed the siteurl in the wp-options table to http://www.example.com now when I try to visit a non-www url it redirects me to the www option. it all works great

But now I have created an "application" subfolder that serves the angular application. Now when I visit http://example.com/app/

then it works ... but when I visit http://www.example.com/app/

it shows me a Wordpress 404 page. Is it not possible to set this setting?

Server aws + apache.

+3


source to share


2 answers


If you are using .htaccess file you can add this before rewrite rule for wordpress index.php

RewriteCond %{REQUEST_URI} ^/app/.*$
RewriteRule ^(.*)$ $1 [L]

      



It checks if the requests start from the application / and are passed unchanged.

+2


source


Please check your angular app where to serve, means which port is being run, and also check your main wordpress site where?



0


source







All Articles