1
1
1deep12022-04-15 20:49:49
Apache HTTP Server
1deep1, 2022-04-15 20:49:49

How to change the root directory of an Apache site?

The essence of the question is this: I have a website and I need the index page to be displayed when visiting site.com/ru .
That is, change the root directory so that site.com/ = site.com/ru . And it is desirable to disable site.com/ altogether .
How can this be done in Apache?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
ThunderCat, 2022-04-15
@ThunderCat

is configured via mod_rewrite, and you do not need to change the folder, you need to correctly configure the server and the web application itself.

A
AlexVWill, 2022-04-15
@AlexVWill

And it is desirable to disable site.com/ altogether

You can’t turn it off completely, because. how do you go to the site? :) You can make a forced redirect by adding the necessary redirect rule to the config, here it is written in detail how to do it
https://www.digitalocean.com/community/tutorials/h...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question