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 snipet 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...

"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

 

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

Code:
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
RewriteRule ^(.*)$ joomla/$1 [L]



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

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

 

 

Comments
Add New Search
Yaron  - one more wuestion   |77.127.12.149 |2012-01-21 19:31:25
I had an old joomla intallation in the main folder and after installing the new version in subfolder i followed your directions and managed to switch the domain nice and quick.

BUT, in the administrator panel, every time I save article, the panel "throws" me to the previous joomla installation...!

Any Idea how to fix that?

Thanks ahead!!!
Monty  - Worked with small change   |199.101.129.214 |2011-11-21 18:26:03
I just installed Joomla 1.7.3 on godaddy. This worked for my will a small change to step 1 on the webroot .htacess.

I added the following two lines off of the example he referenced.

Options +FollowSymLinks
RewriteEngine On
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
RewriteRule ^(.*)$ joomla/$1 [L]
Patrick  - Missing One Piece   |74.120.35.3 |2011-10-14 14:10:35
This worked except for one piece, the webroot .htaccess file for me was not getting to the Joomla joomla/index.php file. So here is the change I made in my instance:

## Now the rewrite of subdir to rootdir
RewriteCond %{REQUEST_URI} !^/joomla
RewriteRule ^$ joomla/index.php [L]
RewriteRule ^(.*)$ joomla/$1 [L]
Jan Popovic  - index.php not taken by default   |77.57.191.97 |2011-06-05 15:28:21
Hi All,

Thank you very much for this guideline.

I've followed it to the point but unfortunately when typing http://yoursite.com into the browser address field leads me to the GoDaddy "Coming soon" default page.

When however I include the suffix index.php i.e. http://yoursite.com/index.php my website included within the joomla subdirectory comes up.

Is there anything I could have missed? I would appreciate your ideas.

Thank you!
Jan
Sr  - Redirection   |82.12.10.84 |2011-03-19 22:04:32
I have some issue in website

i kept joomla in one folder called joomla,but I want to see my page in direct domain www.mywebsite.com

but now I can see www.mywebsite.com/Joomla

How can i redirect to my site to main host.

for example

www.mywebsite.com/folder..it works
I want to see www.mywebsite.com



can u please assist how to do it




jijil  - why following code is not working? pls help me   |74.70.157.155 |2011-02-06 19:34:09
RewriteBase /mastersoft/

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

#Change http://mastersoftindia.com to http://www.mastersoftindia.com (Optional)
RewriteCond %{HTTP_HOST} ^mastersoftindia.com$
RewriteRule ^/?(.*)$ http://www.mastersoftindia.com/$1 [R=301,L]
#### Rewrites http://www.mastersoftindia.com/mastersoft to http://www.mastersoftindia.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} !^/mastersoft
RewriteRule ^(.*)$ mastersoft/$1 [L]
NewUsertoJoomla  - Why Code is not working (Maybe?)   |74.70.157.155 |2011-02-06 19:56:18
Change:
RewriteBase /mastersoft/
To:
RewriteBase /
...............
Everything else looks OK to me. Also, see Trent's message below. There are two (2).htaccess files being changed in 2 separate directories. One has RewriteBase / and the other should be RewriteBase /mastersoft
nickg   |72.66.49.118 |2010-11-25 16:28:03
I want to thank you for this simple, smart and perfect resolution for this issue...All the best to you....Nick.
Alek   |216.255.163.131 |2010-10-06 12:39:49
Unfortunately option 2 did not work for me
Trent  - Wow - great!   |74.70.157.155 |2011-02-06 19:59:54
Success! THANK YOU! The directions are great and easy to follow. One small thing to consider is that in step 2 of the .htaccess option you must change "#RewriteBase /" to "RewriteBase /joomla" (text inside this file) BEFORE renaming the file (removing the .txt). Otherwise you may not be able to open it. Also remember to name BOTH .htaccess files with no .txt extension. That's my small comment. Thank you again! Life saver!
azruser   |72.84.251.183 |2010-04-04 11:14:37
This is almost perfect. It is by far the simplest format to follow. I just have one issue. I did a test by copying the folder and it worked except after the home page all other pages still had .../joomla/new... I thought it was because I didn't move the folder. So I tried by moving the folder and I just got 404 errors.

JoomlaNewUser   |72.224.95.11 |2009-05-05 15:16:40
:) This answered my question right away!
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
  

 nbsp;"

 

Your Breadcrumbs:

Home

Visitors

mod_vvisit_counterVisits Today496
mod_vvisit_counterThis Month3266
mod_vvisit_counterVisited Last Month15871
mod_vvisit_counterTotal Visitors460673

Your IP: 38.107.179.237
,
Today: Feb 05, 2012