I am having trouble loading fonts and icons hosted on main domain from subdomain.
I am on
and I need to detect that /desired/url/ is in request and based on that redirect to:
So far I failed getting 404 in the subrequest asking for that resource. When I manually enter the desired url in address bar or edit request it succeeds and returns the resource. Given these circumstances I assume the problem is in redirection, so I googled a lot and found solution that is supposed to work, but it doesn't.
I am running Apache 2.4.18 with php7 on Xubuntu 16.04, my vhosts look like this:
<VirtualHost *:80> DocumentRoot "/var/www/html/domain/" ServerName domain.loc </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/html/domain/sub/www/ ServerName sub.domain.loc RewriteEngine on RewriteRule ^(.*)desired/url/(.*) domain.loc/url/desired/$2 [R=301,L] </VirtualHost>
What am I doing wrong?
Also what other stuff should I provide for the others to be able to determine the source of problem?