How to Properly Make a Redirect in Elgg

On a previous post I showed you a quick way to redirect your site. However this only works if your site was properly installed, like described in this post. In this article I will give you a step by step guide on how to properly redirect your elgg site from mydomain.com to www.mydomain.com. First, sign into elgg as an Admin and follow these steps:

1. Go to the administration page. In there, go to the Site Administration Section and change the site URL from mydomain.com to www.mydomain.com (were mydomain is your domain name):

2. Click on save. Now, don’t close the window or log out of elgg. Now do the following:

 

3. Sign into your cPanel

4. Go to the files section and click on file manager and select the domain in which your elgg site is installed:

5. Now, look for the file named .htaccess Right click on it and select code edit:

6. Go to the #RewriteBase section in that file. Paste this code inside that section:

RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]
(where mydomain is the domain name in which elgg is installed)

7. Save the changes. Now, go back to the cPanel, and look for the domains section and click on Redirects:

8. This will take you to another screen where you will set up the redirect. Fist, select the domain of your elgg site, then write the domain name with the www. part

Check the Do not redirect www. and click add:

9. After that you are done redirecting your elgg site.

This process involves a lot of steps. However this is the best way to do it. If you just go to the cPanel and do the redirect there, it will not let you login to your elgg site, it will give you a blank page. Doing it this way, will save tons of hours trying to figure out what went wrong.

This now concludes How to properly redirect your elgg site from mydomain.com to www.mydomain.com

For more info about Elgg hosting solutions, visit Arvixe-Elgg Hosting

Happy Hosting!

Rodolfo Hernandez

Tags: , , , , , | Posted under Elgg | RSS 2.0

Author Spotlight

Rodolfo Hernandez

Rodolfo Hernandez

I like photography and reading books. Currently working for Arvixe as Elgg Community Liaison. Elgg Security Expert Web Security Expert CEO of UDP SW Social Web

Leave a Reply

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


7 − 1 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>