How to create permanent redirect on Apache web server

This short tutorial will guide you how to create permanent redirect on Apache web server. I have a working Apache web server installed on Debian 9, I also have Nextcloud 12 installed on it. I did not install Nextcloud on my root web server. And now I want to redirect my root web server to my Nextcloud installation.

For example:

I want to redirect access to my Nextcloud installation at:

To solve my case, I only need to edit the apache default configuration under /etc/apache2/sites-available

You can modify the above configuration to match with yours. Now restart Apache web server

Suggested post to read


Leave a Reply

Your email address will not be published. Required fields are marked *