NA Need HELP with .htaccess - hosting new domain under mine on GoDaddy

Discussion in 'Hangar Talk' started by AuntPeggy, Dec 4, 2017.

  1. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    I've had a site on GoDaddy for years and use it to dabble and put things up for the grandkids.

    Now, I want to host a separate domain for the local flying club. I've tested it out on my local machine and uploaded all the files, but once on GoDaddy, none of the club files can be accessed. I've spent hours on the phone and on chat and they finally kicked me loose, saying that they don't provide online support for .htaccess, which will be required to make the second site accessible.

    One of the things I did was change all the directory and file names to lower case, but I'm in the process of changing them back to CamelCase.

    It should be a purely simple issue, but I've never worked with .htaccess and after spending hours searching on the Internet, am getting increasingly confused and frustrated. I want the site up tomorrow night when the club has its first meeting.

    Please help.

    - Aunt Peggy
     
  2. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    What makes you think it is an .htaccess issue? What are you trying to do with it? Post the file content.
     
  3. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    .htaccess is currently empty.

    Previously used one is: .htaccess.bak
    # Sample Root '.htaccess' file

    # Controls access to TWiki 'root' directory (parent of the 'bin' directory)
    # - rename this file to '.htaccess' to have Apache use it.

    # Turn off directory indexing in this and sub directories
    Options -Indexes

    # Redirect any access to 'index.html' to the 'view' script (i.e. Main.WebHome)
    # Disabled by default - uncomment if required, will hide the real index.html.
    #
    # The first path here must be a URL path, not a file pathname
    Redirect /index.html http://auntpeggy.com/index.htm
     
  4. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    I am told that the new site needs to be added to .htaccess
     
  5. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    You can't just add a domain name to a hosting account with an .htaccess file. What steps did you follow before you started fiddling with that? Does your GoDaddy hosting account even permit you to host multiple domains with one account?

    Told by who? GoDaddy support?
     
  6. Salty

    Salty Cleared for Takeoff

    Joined:
    Dec 21, 2016
    Messages:
    1,388
    Location:
    FL
    Display Name:

    Display name:
    Salty
    What do you want the URL to be for the new site? Something like auntPeggy.com/flyingclub or flyingClub.auntpeggy.com?
     
  7. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    Yes, my GoDaddy hosting account permits additional domains. They sold me the domain name and "said" they set up the domain so that it can be accessed, but to no avail.
     
  8. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    Selling you a domain name is one thing. Hosting it is another. Two different concepts. Are they doing both?

    "Set up", how? Not enough information.

    If you post or PM me the domain name, I might be able to figure out what they mean by "set up".
     
  9. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    The original domain is installed in AuntPeggy.com
    There is a file folder under the root called public_html
    Under that are the folders and files for AuntPeggy.com
    One of the folders is named SkiatookFlyingClub.com
    Under that are 5 folders, cgi-bin, Documents, Downloads, Images, Scripts
    and 2 files, .ftpquota, index.htm
     
  10. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    Yes, GoDaddy support.
     
  11. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    https://www.godaddy.com/help/what-type-of-hosting-account-do-i-have-6971

    What is your Tier and Account Type?

    Different platforms are configured differently, I am guessing that the SkiatookFlyingClub.com is not in the correct place, or the capitalization needs to be different—it depends on how their server is configured. There could have even been an error on GoDaddy's part. I seriously doubt that your problem has anything at all to do with .htaccess. I would contact support again and tell them that it seems like your new domain is not pointing to the correct folder, or ask them what the name and location of the folder is supposed to be.

    http://auntpeggy.com/SkiatookFlyingClub.com/ is working which helps to isolate the problem.
     
  12. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    All I can see is Deluxe Linux Hosting with cPanel
     
  13. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    Well, that's an improvement. It is opening in Chrome for me, but still not working for Internet Explorer. I'll get online in chat with support again in the morning, I guess.

    I'm still at a loss about .htaccess, anyway.
     
  14. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    Log in to your cpanel:
    http://auntpeggy.com/cpanel

    Under "Domains" find "Addon Domains" and see if you can find the configuration of your new domain there. Post a screenshot of it.
     
  15. EppyGA

    EppyGA Touchdown! Greaser!

    Joined:
    Jan 6, 2009
    Messages:
    10,036
    Location:
    Hoschton, GA
    Display Name:

    Display name:
    Let's Fly
  16. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    I have no idea what kind of hosting you have, what you're trying to do, nor even if you're using Apache.

    What I think you're trying to do is to route requests to SkiatookFlyingClub.com to that folder on auntpeggy.com, which I think would require something along the lines of:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www.)?skiatookflyingclub.com$
    RewriteCond %{REQUEST_URI} !^/SkiatookFlyingClub.com/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /SkiatookFlyingClub.com/$1
    RewriteCond %{HTTP_HOST} ^(www.)?skiatookflyingclub.com$
    RewriteRule ^(/)?$ skiatookflyingclub.com/index.html [L] 
    Or something like that.

    Rich

    EDIT: Actually, since I now see that you have cPanel, you probably could have done this a lot more easily without GoDaddy's help. cPanel usually handles these sorts of things pretty well.
     
    Last edited: Dec 4, 2017
  17. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
  18. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    You have some path problems with the images.

    Rich
     
  19. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    Why is it pointing to SKIATOOKFLYINGCLUB.COM/scripts as the document root?

    Rich
     
  20. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    I have my scripts in /Scripts. My initial script is /Scripts/Home.html. I can change that if required.
    And, all the capitalization is wrong. It should be SkiatookFlyingClub.com/Scripts/Home.html

    Thanks Rich and dmspilot.
     
  21. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    Here are screen shots of the directories. The index.html you see is a copy of /Scripts/Home.html, but it can't find it's .css file in this folder.
     
  22. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    Trying again.
     

    Attached Files:

  23. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    Yes the capitalization is all wrong and it is case sensitive. Click the pencil icon next to the document root on the addon domain cpanel page and fix it so it matches the capitalization of the actual folders. Or you can rename folders. They have to match.

    "/public_html/SkiatookFlyingClub.com/Scripts" seems to be your intended document root, not
    "/public_html/SKIATOOKFLYINGCLUB.COM/scripts"
     
  24. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    Normally the document root is / . I guess there's no reason why it can't be in /scripts, but it's a bit... unorthodox, especially since none of the files are actually scripts.

    You may find your life to be much easier in the future if you adopt a more conventional file tree. Something like...

    /
    /Images
    /CSS
    /Downloads
    /WhateverElseYouNeed

    and put all the page files in the root. It's just easier that way, especially as the site grows. But there's no technical reason why you have to. As long as all the paths are right, the site will work.

    Dotted directories (for example, .includes) are "hidden" and non-browsable by users in Unix, just in case you need that bit of knowledge. There are some things that should only be in hidden directories, but I don't see any in your files.

    Rich
     
  25. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    .htaccess, by the way, is a configuration file used to tell Apache when you want it to do something in particular that it wouldn't know to do otherwise.

    It's actually quite powerful, but also quite finicky. A misplaced punctuation mark in .htaccess is a great way to crash your entire site. That's why it's important to always back up the working one when farting around with it. It's also part of why it exists: .htaccess allows users to hose their own sites without hosing those of everyone else on the server, as they could if they were allowed access to the server-wide Apache configuration files.

    You can read more about .htaccess at http://www.htaccess-guide.com/, appropriately enough, or at https://httpd.apache.org/docs/current/howto/htaccess.html if you want the official version.

    Rich
     
  26. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
  27. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    Is the DNS server pointing to the wrong place?

    Yeah, Rich, I guess I will have to move my pages to the root, much as I dislike that.
     
  28. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    dmspilot, what is the cost of your scheduling software?
     
  29. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot

    Attached Files:

  30. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    Starts at $12.50 a month for up to 3 planes (or 2 planes and 1 instructor, or 1 plane and 2 instructors, etc.). There's a free trial you can sign up for here.
     
  31. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,437
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    I'm much too sleepy now. Bye, guys. Thanks.
     
  32. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    http://skiatookflyingclub.com/ brings up the page sans most of the images (including the background images). It's an improvement because it's showing up as its own domain rather than a subfolder on auntpeggy.com. So apparent you have the .htaccess file working.

    As for the images, looking at the source, you're using backslashes ( \ ) instead of forward slashes ( / ) for the image paths.

    [​IMG]

    That won't work. You need to use forward slashes for paths in HTML. But the paths are also wrong. Just changing the slashes doesn't fix them. I'm not finding them in /Images nor /scripts/images, so I really don't know where you have them. I'd have to guess in /Images relative to wherever you have .htaccess pointing the domain.

    You're close. I predict you'll have it fixed within an hour.

    Rich
     
  33. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    Actually, I'd look at .htaccess again. The absolute path to one of your images is

    http://auntpeggy.com/SkiatookFlyingClub.com/Images/N8338X.jpg

    which works, but

    http://skiatookflyingclub.com/Images/N8338X.jpg

    does not. It should if the domain is pointing to the root of the directory /SkiatookFlyingClub.com/. http://skiatookflyingclub.com/scripts/Images/N8338X.jpg doesn't work either. You may want to download .htaccess and see if cPanel has also been trying to get things straightened out for you. There may be duplicate, conflicting entries in there.

    A quick kludge to get the site online while you're prettying things up server-side would be to just use the absolute paths for all the images in both the HTML and CSS. Cheating perhaps, but it would work for now.

    Rich
     
  34. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    htaccess has nothing to do with it. We established that already. The images aren't showing up because they reside in a directory that's above the document root ("../Images") which the server will deny access to. Everything has to be in the document root or a subdirectory thereof. The auntpeggy.com works since the doc root for that domain is several levels up the directory hierarchy.
     
    Last edited: Dec 5, 2017
  35. RJM62

    RJM62 Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 15, 2007
    Messages:
    11,544
    Location:
    Catskill Mountains, New York
    Display Name:

    Display name:
    Geek On The Hill
    Except that the absolute path http://auntpeggy.com/SkiatookFlyingClub.com/Images/N8338X.jpg does work, and in that path Images is a subdirectory of /SkiatookFlyingClub.com (unless it's a symlink to an /Images directory in /, which I have no reason to believe it is).

    Rich
     
  36. dmspilot

    dmspilot Pattern Altitude

    Joined:
    Oct 20, 2006
    Messages:
    2,375
    Display Name:

    Display name:
    dmspilot
    Different domain, different vhost, different docroot, different directory hierarchy. Not sure what point you're trying to make.

    "../Images" with respect to "http://skiatookflyingclub.com/" is inaccessible because you can't go up one level above / in a url. That's why it's called the document root. http://anydomain.com/../anything, or /../anything, or ../anything from a link relative to / will result in the webserver issuing an error page.

    "../Images" with respect to "http://auntpeggy.com/skiatookflyingclub.com/Scripts" is equivalent to "http://auntpeggy.com/skiatookflyingclub.com/Images" which is a subfolder (several levels down) of the docroot of the auntpeggy domain so it is accessible from the auntpeggy domain.
     
    Last edited: Dec 5, 2017
  37. bflynn

    bflynn En-Route

    Joined:
    Apr 24, 2012
    Messages:
    3,318
    Location:
    Fuquay Varina, NC
    Display Name:

    Display name:
    Brian Flynn
    Not sure if it helps, but right now I can see images on skiatookflyingclub.com so however it's configured right now appears to be working. I'm not a fan of the plaid couches, but I'm sure they're lovely in person.
     
  38. cowman

    cowman En-Route

    Joined:
    Aug 12, 2012
    Messages:
    3,107
    Location:
    Danger Zone
    Display Name:

    Display name:
    Cowman
    http://skiatookflyingclub.com/ is up from here, I see some functional and non-functional buttons and an image of a lounge and an airport.

    I don't use godaddy but usually stuff like this is handled through an admin console with hosting companies. I wouldn't have thought you'd need to mess with an .htaccess file. At least that's how it works on the hosting service I use, you just designate a folder to be the root for any domains you have registered through them.
     
  39. jsstevens

    jsstevens En-Route PoA Supporter

    Joined:
    May 18, 2007
    Messages:
    3,558
    Display Name:

    Display name:
    jsstevens
    Some images are there (the aformentioned plaid couches and the areal shot of the airport) others are still broken links (the C-172 for example).
     
  40. Clark1961

    Clark1961 Touchdown! Greaser!

    Joined:
    Jun 7, 2008
    Messages:
    15,660
    Display Name:

    Display name:
    Throttle
    Anybody else notice the structure on the shade hangar and say WTF?

    I guess excess material doesn't really matter once a welded beam is selected. It might speed construction a little bit. Anyway that center section should be hell for stout...