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

AuntPeggy

Final Approach
PoA Supporter
Joined
May 23, 2006
Messages
8,479
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
 
What makes you think it is an .htaccess issue? What are you trying to do with it? Post the file content.
 
.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
 
I am told that the new site needs to be added to .htaccess
 
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?

I am told that the new site needs to be added to .htaccess

Told by who? GoDaddy support?
 
What do you want the URL to be for the new site? Something like auntPeggy.com/flyingclub or flyingClub.auntpeggy.com?
 
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.
 
Yes, my GoDaddy hosting account permits additional domains. They sold me the domain name

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

and "said" they set up the domain so that it can be accessed, but to no avail.

"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".
 
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
 
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.
 
All I can see is Deluxe Linux Hosting with cPanel
 
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.

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

You have some path problems with the images.

Rich
 
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.
 
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.
 
Trying again.
 

Attachments

  • upload_2017-12-4_21-8-13.png
    upload_2017-12-4_21-8-13.png
    662.4 KB · Views: 11
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.

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"
 
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
 
.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
 
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.
 
dmspilot, what is the cost of your scheduling software?
 

Attachments

  • Screen Shot 2017-12-04 at 11.13.49 PM.png
    Screen Shot 2017-12-04 at 11.13.49 PM.png
    76.3 KB · Views: 4
dmspilot, what is the cost of your scheduling software?

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.
 
I'm much too sleepy now. Bye, guys. Thanks.
 
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.

source.jpg


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

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

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

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).
 
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...
 
Back
Top