Answer the question
In order to leave comments, you need to log in
Redirect from site root to subfolder (without displaying subfolder in URL)?
Given:
In the site folder (say site.ru ) there are two subfolders: /dev and /web .
I need that when accessing site.ru in the browser, index.php is loaded from the /web folder , and at the same time site.ru is displayed in the URL , and not site.ru/web .
How to do it? Is it possible through .htaccess or somewhere in the server settings?
PS In /web there is a site on Joomla (and in its config I didn’t find anything other than the path to the logs and tmp)
Answer the question
In order to leave comments, you need to log in
I solved the issue using cPanel hosting - there was an opportunity to set the root folder for the domain.
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/.*$
RewriteRule ^(.*)$ /web/$1 [QSA,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question