0
Welcome Guest! Login
0 items Join Now

How to Make Subfolder Main Folder Joomla Main Site Tutorial

    • Aurora's Avatar
    • Aurora
    • Elite Rocketeer
    • Posts: 903
    • Thanks: 0

    How to Make Subfolder Main Folder Joomla Main Site Tutorial

    Posted 16 years 4 months ago
    • System: Joomla

      Tutorial: this tutorial is goin to show you how to setup your sub folder as main folder so your site can stil read as www.mysite.com and not www.mysite.com/subfolder

      1. .htaccess copy code below and make necessary changes to the folder parts to reflect your subfolder as main folder.

      # YOurserver.com here
      # .htaccess main domain to subfolder redirect
      # Copy and paste the following code into the .htaccess file
      # in the public_html folder of your hosting account
      # make the changes to the file according to the instructions.


      # Do not change this line.

      Options +FollowSymlinks
      RewriteEngine on


      # Change yourdomain.com to be your main domain.

      RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$


      # Change 'subfolder' to be the folder you will use for your main domain.

      RewriteCond %{REQUEST_URI} !^/subfolder/

      # Don't change this line.

      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d

      # Change 'subfolder' to be the folder you will use for your main domain.

      RewriteRule ^(.*)$ /subfolder/$1

      # Change yourdomain.com to be your main domain again.
      # Change 'subfolder' to be the folder you will use for your main domain
      # followed by / then the main file for your site, index.php, index.html, etc.

      RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
      RewriteRule ^(/)?$ subfolder/index.php [L]

      Final Step: then in your joomla configuration.php file that is in the subfolder where your joomla site is where you want it to be the main site. open it up and look for where it says live site, and add your website name it should look like this

      var $live_site = ' www.mysite.com ';

      Final notes:
      alot of people have been trying to achieve this but having hard time with server htaccess file, so heres what your want to look out for just make sure that the redirects in your cpanel you delete and add then manually to the htaccess file with the above code, followed by the joomla configuration.php file setup.

      merry christmas to come and an wonderful new year

Time to create page: 0.054 seconds