Hiding Joomla Subdirectory - GoDaddy

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';



Hiding Joomla Subdirectory - GoDaddy

1 comment:

история создания сайта создание сайтов тольятти said...

история создания сайта от 400$ создание сайтов web дизайн разработка сайтов веб дизайн создание сайта http://web-miheeff.ru +7 (495) 782-72-56 история создания сайта