• 0

Automatically Redirect to the /OwnCloud in Apache

Question

Posted · Report post

So I've recently been asked a fairly simple question, but I felt that it was appropriate to write a guide on how I achieved the desired result. I was asked the following:

 

When I type the address of my CentOS based OwnCloud server, how do I get it to automatically redirect to the OwnCloud directory?

 

It seems the easiest answer to this is to create a HTML file that automatically redirects the user to the desired page. The desired page in this case is '/owncloud'.

 

1) From the console (I recommend using PuTTY to connect since you will need to copy and paste commands), connect to the server over SSH.

 

2) Navigate to the /var/www/html

cd /var/www/html

3) Using nano or another text editor, type the following command.

nano index.html

4) Should any content appear in here, such as the Apache default page code, remove it.

 

5) Paste or type the following code.

<meta http-equiv="refresh" content="0; url=/owncloud" />

6) Next, press CTRL+O, press enter, and then press CTRL+X to exit.

 

7) Done! You'll now be redirected to the OwnCloud directory upon entering your server name / IP address.

WinnerPlus likes this

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

I think this is more like "How to edit your index page and add a refresh meta tag to redirect to /owncloud" as that's what you're doing. Nevertheless, great tutorial.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Please is it apply to all Linux flavors or just CentOS?

 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

In this article, just CentOS but it is certainly possible to do it with other Linux flavours!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now