D
D
Denis Shavaleev2021-04-06 09:48:30
Apache HTTP Server
Denis Shavaleev, 2021-04-06 09:48:30

How to set up a page redirect in htaccess?

Set up the server. At manual transition in the page browser loads ( apachehost/public/page.php ).
I can't configure it to redirect to this page when contacting the host address.

virtualhost.conf

<VirtualHost *:80>

        ServerName name
        ServerAlias my.domain.com
        ServerAdmin [email protected]
        DocumentRoot /var/www/html/service
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>



I tried to prescribe similar lines in .htaccess, it did not work out.
.htaccess edits

DirectoryIndex public/page.php
Options +FollowSymLinks
RewriteEngine on
RewriteRule public/page.php [QSA,NC]
RewriteRule page.php public/page.php [QSA,NC]



How can I make it so that when accessing the address of the apache host, it sends immediately to the public/page.php page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2021-04-06
@Shavaleev_DieZ

well, I think you need not to invent a bicycle and put a web face so that they are put in 1 click and everything works.
the simplest option
is vestacp - the web muzzle can be installed in 1 click
braynicp - it can do a lot, but it requires real knowledge because the interface is so-so also installed in 1 click
ispconfig3 - excellent interface, rich functionality comes in mana, and even from above, you need to wind up nginx + apache for learning itself is the most pleasant thing to use, but it takes time to install.
bitrixVM is installed in 1 click console (pseudographic) admin panel. (there is no DNS server, but as I understand it, you don’t really need it) (only centos 7)
ZPanel - didn’t set
Everything open source is set easily, it makes no sense for you to pick configs at this level of knowledge.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question