I have two domains (here are the actual domain names for simplicity):

snapstarr.com
fuselog.net

I have one hosting account with GoDaddy, for the two domains. the primary domain is snapstarr.com. I have some subfolders on snapstarr.com:

snapstarr.com/lockbox
snapstarr.com/fuselog
snapstarr.com/nomouse

at this point, you might notice that the 2nd subdirectory in that list is the same as the secondary domain listed at the top.

By default, when purchasing an add-on domain with GoDaddy, no additional redirecting needs to be set up (possibly common knowledge). so whan a visitor navigates to fuselog.net, they see the website comprised of the files that are sitting in snapstarr.com/fuselog, but fuselog.net remains in the address bar (with whatever slashes and autofills the browser appends to it).

that's all well and good and perfect, until a user navigates to fuselog.net, fuselog.net/, www.fuselog.net, http://fuselog.net/, snapstarr.com/fuselog, http://www.snapstarr.com/fuselog/ etc. etc. and every other combination of trailing slashes and leading w's.

What I need is for every single one of the possible formats to bring the user to the same location, and also consistently show that in the browser's URL bar.

I have multiple reasons to want to do this. one, i simply don't want a visitor to see snapstarr.com/fuselog in their browser bar. the sites are unrelated, and if someone ever navigates there, I want to change the URL to www.fuselog.net, because that's the name of the site they're looking at.

There is also the issue of cookies. fuselog.net and www.fuselog.net are not the same place, to search engines or to browsers. I don't want to save my cookies with the ".fuselog.net" trick, I'd rather just store everything as www.fuselog.net, which I've read has a slight speed advantage also.

So in summary, I would like the following formats (and only these):

snapstarr.com/fuselog
snapstarr.com/fuselog/
www.snapstarr.com/fuselog
www.snapstarr.com/fuselog/
http://www.snapstarr.com/fuselog
http://www.snapstarr.com/fuselog/
fuselog.net
fuselog.net/
www.fuselog.net
www.fuselog.net/
http://www.fuselog.net
http://www.fuselog.net/

to show the website in the folder:

snapstarr.com/fuselog

but always display:

http://www.fuselog.net/

in the browser bar.

If it's relevant: I need normal function of snapstarr.com to be preserved. that is, the root of snapstarr.com is its own site. Ideally, I'd like to see www's no matter what a user types or which domain they are trying to get to.

I have talked to many different people at GoDaddy, sometimes their "domain specialists", and we've gotten very close. in each attempt (two weeks worth). I'm able to get most, but not all of the conditions to be met. I've searched for and tried lots of mod_rewrite approaches and made a slew of custom .htaccess files.

I've ended up with inevitable redirect loops because I tried putting one in the root and one in the subdirectory.

I simply don't know enough about regular expression and mod_rewrite rules, and my head doesn't seem malleable enough to wrap it around this stuff.

I'll spare you the many RewriteCond's and RewriteRule's that I've tried, as I'm sure anyone capable of answering this question has seen them all. At this point I'm just hoping someone knows the order in which I need to place the rules and what their contents need to be. I appreciate any and all input, immensely.

Step 1: Set up your add-on domain with separate FTP

Here is GoDaddy documentation for an add-on domain. Their instructions says that creating a secondary domain with different content will create a separate ftp user and password where you can upload your content. That is what you want to do. If you do it that way then snapstarr.com/fuselog/ (and related variants) won't show the same content.

Step 2: Redirect fuselog.net to www.fuselog.net

from How to forward non-www to www. Using Godaddy DNS Manager, Wooble says: "Fortunately, Godaddy provides this service for free; follow these directions

Step 3: Redirect snapstarr.com/fuselog/ to www.fuselog.net

Here are the instructions for setting up a redirect on your snapstarr domain


The only other thing that you appear to be confused about is that several of your examples are the same thing. There is no difference between:

www.fuselog.net
www.fuselog.net/
http://www.fuselog.net
http://www.fuselog.net/

In those cases, the browser may or may not choose to show the leading http://. If the browser doesn't show it, it is still there, just implicit. Newer versions of Firefox never show it, for example. But if you copy the URL from the address bar the http:// gets added.

Similarly, for a domain name root directory, the trailing slash is assumed. Browsers have no way of making the request without it. According to the HTTP spec, every request must start with a /. Whether or not it is shown in the URL bar is completely cosmetic. (Trailing slashes after deeper directories are a different story, however.)

  • 1. I build my sites from scratch and upload them with fireftp. I always bring myself to the root of the main hosting domain, snapstarr.com, and dive into the appropriate subdirectory for the site I happen to be working on. Regardless, FTP settings should not be a factor here. – Kendall Starr Dec 11 '14 at 20:24
  • 2. Had done that, many times. It works, but... 3. This creates a redirect loop. (http://)www.fuselog.net(/): they're the same thing in the browser window, but not the server. I get different behavior simply by adding or omitting the trailing slash. fuselog.net/ is really snapstarr.com/fuselog/, a deeper directory/whole different story, as you put it. Thanks for the reply and effort, but I'm still hoping for a sample htaccess file. I called godaddy again today. Their control panel won't accomplish what I need, hence my mention of mod_rewrites – Kendall Starr Dec 11 '14 at 20:46

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.