M
M
Mortech2020-10-28 10:45:22
Apache HTTP Server
Mortech, 2020-10-28 10:45:22

How to call site content from another directory?

It is necessary to call the contents of the directory at ww2.example.com (with the rights of the current user, without accessing root rights). How can this be done?
/home/clients/test_ftp0/domains/example.com/html/ww2/
My futile attempt to do anything via .htaccess. And there is an assumption that creating a separate virtualhost can help (but right) for the ww2.example.com subdomain, whose DocumentRoot parameter will be equal to "domains/example.com/html/ww2".

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)ww2.example.com$
RewriteCond %{REQUEST_URI} !^/ww2/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ww2/$1
RewriteCond %{HTTP_HOST} ^(www.)?ww2.example.com$
RewriteRule ^(/)?$ ww2/ [L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-10-28
@sergey-gornostaev

Depends on which web server is being used.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question