R
R
rejjer2016-05-16 17:31:26
PHP
rejjer, 2016-05-16 17:31:26

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

There is a site, for the work of the cnc, all paths to scripts, styles and pictures are absolute.
Now it was necessary to move the site two directories deeper, so all the paths were broken.
(/site.com -> /a/b/site.com)
Is it possible to somehow fix it without changing the paths to all 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]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Decadal, 2016-05-16
@rejjer

the DocumentRoot option determines where the files for web access are located. Usually this option is located in the file:
/etc/apache2/httpd.conf or /etc/apache2/apache.conf
if it is not there, then add a line to the configuration file
or
then restart Apache
, this may be suitable for solving your problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question