P
P
Pavel Kizernis2015-11-03 11:59:19
Joomla
Pavel Kizernis, 2015-11-03 11:59:19

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

3 answer(s)
P
Pavel Kizernis, 2015-11-03
@pashakiz

I solved the issue using cPanel hosting - there was an opportunity to set the root folder for the domain.

R
riot26, 2015-11-03
@riot26

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/.*$
RewriteRule ^(.*)$ /web/$1 [QSA,L]

O
Optimus, 2015-11-03
Pyan @marrk2

Redirecting everything to index.php in site.ru like this How to redirect all requests to index.php (.htaccess)? and in it, roughly speaking, you load everything you need from site.ru/web.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question