How to tell the server that all absolute paths must begin with the current directory?

There is a site for work NC all the way to the scripts, styles and images of the absolute.
Who is required to move the site to two directories deeper, respectively, all the way broke.
(/site.com -> /a/b/site.com)
Is it possible to repair without changing the paths to all the files?
.htaccess:
RewriteEngine On
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?act=$1 [L]
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?act=$1&opt=$2 [L]
July 9th 19 at 13:41
1 answer
July 9th 19 at 13:43
Solution
the DocumentRoot setting specifies where files for web access. Usually this option is in the file:
/etc/apache2/httpd.conf or /etc/apache2/apache.conf
if it's not there, then add to the configuration file the line
DocumentRoot "C:/Sites/home/localhost/www"
or
DocumentRoot "/var/www/your_domain/a/b"
then restart Apache
maybe this will do for solve your problem
It is necessary that /var/www/your_domain also worked - Reagan_Bins68 commented on July 9th 19 at 13:46
then create a subdomain or another domain, take, time there was such a division. And set the primary domain /var/www/your_domain and for your website in the settings of subdomain "/var/www/your_domain/a/b". I don't see an absolute path, which goes via your_domain/a/b as well as went before for your_domain without moving the DocumentRoot, despite the fact that your_domain also will work as if nothing had happened. How did he know where to go - Ivory.Swift90 commented on July 9th 19 at 13:49
in order to use .htaccess in lower level (~/a/b), you need to route passed through this way(with absolute references this is not happening). And to use at the top level (the root directory), htaccess'do you need to know about all the links referred to your website before to redirect them to /a/b, but it does not redirect anything extra. I don't think the problem is solved htaccess'om - Ivory.Swift90 commented on July 9th 19 at 13:52

Find more questions by tags ApachehtaccessPHPWeb Development