Results 1 to 6 of 6

Thread: .htaccess missing and not working

  1. #1
    Join Date
    May 2010
    Posts
    4

    Question .htaccess missing and not working

    Hy

    We just bought webhosting yesterday and today we have 4 domains allmost working on it. :p

    One domain is primary and tree are addon domains.
    We would like to have all domains in its own subfolders.

    /home1/*USERNAME*
    /public_html/
    /public_html/primary-domain-1
    /public_html/addon-domain-1
    /public_html/addon-domain-2
    /public_html/addon-domain-3

    HOW can this be done with changing .htaccess?
    I read article: http://helpdesk.bluehost.com/index.p...article/000347 and edited the code. I've renamed htaccess.txt to .htaccess and refreshed the web site. Nothing happened, but the .htaccess file disappeared. :mad::confused:!!!

    Now i can't access the ".htaccess" file anymore.

    Please help. :eek:

  2. #2
    Join Date
    Apr 2008
    Location
    Chasing the Holy Grail - Pacific Northwest
    Posts
    1,312

    Default

    You will need to use an ftp client to see files that begin with a . as they are normally hidden files, and not visible through the cPanel File Manager.

    I would recommend Filezilla. It's free and works on all operating systems.
    In the Hyperion universe, a farcaster is an instantaneous transportation device.
    Experience: The thing you get just after you need it.

  3. #3
    Join Date
    May 2010
    Posts
    4

    Default

    Thank you :)
    I got the htaccess file back to .txt. Which code works? The code in the article doesn't redirect the site. :rolleyes:

  4. #4
    Join Date
    May 2010
    Posts
    4

    Default

    Do i need to remove the text in red color? :confused:


    # Bluehost.com
    # .htaccess main domain to subdirectory 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.
    RewriteEngine on
    # Change yourdomain.com to be your main domain.
    RewriteCond %{HTTP_HOST} ^(www.)?babylove123.info$
    # Change 'subdirectory' to be the directory you will use for your main domain.
    RewriteCond %{REQUEST_URI} !^/babylove123/
    # Don't change this line.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Change 'subdirectory' to be the directory you will use for your main domain.
    RewriteRule ^(.*)$ /babylove123/$1
    # Change yourdomain.com to be your main domain again.
    # Change 'subdirectory' to be the directory 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.)?babylove123.info$
    RewriteRule ^(/)?$ babylove123/index.php [L]

  5. #5
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    4,944

    Default

    Quote Originally Posted by BabyLove View Post
    Do i need to remove the text in red color? :confused:
    No. Those must be there for it to work.

    The only thing that is necessary for the code as you have shown to work is that it must be in the public_html folder with the name .htaccess (with no file extension on the end)

  6. #6
    Join Date
    May 2010
    Posts
    4

    Default

    thank you very much! :p :o

    It works now :)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •