Hiding Joomla Subdirectory - GoDaddy PDF Print E-mail

How to move website from domain.com/joomla to http://www.domain.com/

 

After searching numerous blogs and not finding the exact resolution that I was looking for; I finally found some information that was specific for me and am hoping that this will help others in not having to spend hours of searching for an answer.

"I installed Joomla on the Remote Host (Godaddy) only. I created website. Cannot figure out how to make it show up at main site http://www.domain.com instead of http://www.domain.com/joomla. Don't know how to move it to main directory..." (user: MattieSunshine)

..................................................... 

Published by: Joomla Discussion Forum:

 http://forum.joomla.org/viewtopic.php?f=429&t=382334&p=1651704#p1651704

......................................................  

Resolutions

The following is a snippet from the above forum, where if you are using GoDaddy as your service provider, then you will find these two answers just what you may be looking for:

"...
If there is nothing else in the root of your site www.domain.com other than the default Go Daddy files and folders, then in the File Manager of the Hosting Control Center, select the joomla folder in the right pane and click the move button and choose the root of the site from the left pane as the destination. Once that is finished, edit the configuration.php tmp and log paths to reflect this new location (just remove the /joomla)..." (user: 2ninerniner2)"

Response directly from GoDaddy...

 

Note: This redirect option will only work if you are running your website on Linux hosting account:

"These are all great solutions. If you only need to create a redirect you may also find the Sites Redirect Manager helpful. You can redirect your site from http://www.domain.com to http://www.domain.com/joomla. (user: GoDaddy)

Make sure to select the Content Redirect Option of "No Redirect" in order to avoid a circular redirect loop. Detailed instructions can be found in this help article: http://help.godaddy.com/article/5120" (GoDaddy Hosting
http://blog.godaddyhosting.com - Hosting Blog
http://help.godaddy.com- Help Center)"

 

 

.htaccess Option

Reference from: http://www.drichproductions.com/random-knowledge/rewrite-root-directory-subdirectory.php and http://forum.joomla.org/viewtopic.php?f=429&t=382334&p=1651704#p1651704

 

Step #1 -- create an .htaccess file inside the /webroot/ with the contents:

Code:
# Added by Monty - comment made on 2011-11-21 see comments below
Options +FollowSymLinks
RewriteEngine On
# End comment added on 2011-11-21
RewriteBase /

# Add trailing slash if path does not contain a period or end with a slash
RewriteCond %{REQUEST_URI} !(\.|/$)
RewriteRule (.*) http://yoursite.com/$1/ [R=301,L]

#Change http://yoursite.com to http://www.yoursite.com (Optional)
#RewriteCond %{HTTP_HOST} ^yoursite.com$
#RewriteRule ^/?(.*)$ http://www.yoursite.com/$1 [R=301,L]
#### Rewrites http://www.yoursite.com/subdir to http://www.yoursite.com/
## Added this to allow existing files and directories to work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
## Now the rewrite of subdir to rootdir
RewriteCond %{REQUEST_URI} !^/joomla
# Added to include comment by Patrick on 2011-10-14 see comment below
RewriteRule ^$ joomla/index.php [L]
# End comment added on 2011-10-14 ... 
RewriteRule ^(.*)$ joomla/$1 [L]
 

RewriteCond %{REQUEST_URI} !^/joomla
RewriteRule ^(.*)$ joomla/$1 [L]



Step #2 -- rename the standard /webroot/joomla/htaccess.txt file to /webroot/joomla/.htaccess file (no .txt).

 Change "#RewriteBase /" to "RewriteBase /joomla"

Step #3
-- In joomla/configuration.php, set $live_site to var $live_site = 'http://yoursite.com';

 

 

 

Total Visitors

mod_vvisit_counterTo Date:1242132

Today: Apr 21, 2014