How to "fix" .htaccess

I just learned that I can send these as a private message instead of the public forum. Is that what I should be doing, or is this just fine?

Hi @NeilMike,

Out here is fine - that way, future readers with a similar problem can read this topic back :slight_smile:

Regarding your screenshot:

I’m trying to make sense of it (which is hard to do with just screenshots). I see a couple of things:

Public_html does have a folder called “files”. There’s also an “rw_common” folder in there, so this is a RapidWeaver published directory. This should load, but I can’t see what it would load from this screenshot.

Justinzdeb.com also has “files” and an “rw_common” folders, so the same goes there.

The problem I have is that I can’t tell from the screenshots which URL goes where - yes, it would be obvious that justinzdeb.com goes to the subfolder of that name, but I can’t be sure of that. I also have no idea to which URL the root public_html is linked.

As for the double index files: are you by any chance trying to publish multiple pages to the same directory without putting them in subdirectories? That could indeed cause a double index file.

My opinion: start a new. Delete the subfolders completely, and open you RW projects one-by-one and check the following:

  1. is the correct folder path set up in the Publishing settings?
  2. is the correct URL set up in both the Publishing settings and the General settings

After that, try uploading the troublesome page to the domain in question (which you cleared out earlier) and check what happens. There should now be at least a “files” and an “rw_common” folder and an index.php file. There should NOT be an index.html file.

Some extra advise: if you stage multiple projects on a server, try creating a clear folder structure. I use a staging server that’s on its own subdomain. The subdomain has subfolders for every client project I have. I take great care to set up the publishing settings in each project file so that it only publishes to its little island that is the subfolder and nowhere else. When I’m done with a project, I remove the subfolder to prevent clutter. This is the structure of my staging server, with your test site as an example:

Oh, and you can select local publishing as follows:

  1. Open the Publishing settings
  2. Click on “Add New Destination”
  3. Click on “Other methods…” in the pop up that appears and select “Local Folder”:
    Capto_Capture 2023-05-22_10-49-58_am

Cheers,
Erwin

Thanks, again, Irwin for your detailed guidance. I will need to work through your suggestions carefully, and I will likely have more questions along the way. I’m clearly no expert, however, I’ve been using RW at least since 2011, and I’ve posted numerous new sites during that time; originally, I had to use a file transfer app, unless the direct publishing was there, and I did know it. I switched to direct publishing from RW several years ago. I did publish one site previously using F2 [sleep-apnea-research.org]; I’m confident I did not experience anywheres near this level of complications at that time. I reference my experience base, bc you will likely wonder why I ask some of the questions I will be asking to ask further support of your detailed response.

Separately but related, I recall previously having to publish locally, when I was using FileZilla to upload, i.e., bf I knew I could publish directly from RW. Nonetheless, my question now regards what purpose is served by doing so at this time? At the moment I think my priority needs to be the better understanding and reconciliation of your detailed guidance, but if necessary or useful, I will also undertake an effort to publish locally.

Thanks, again.

NeilMike

P.S. After I sent the suggestion of “going private,” I also realized that would not be the best course, so I’m fully onboard with following the posting methodology we’ve been using.

Hi @NeilMike,

No problem: if you run into anything, just post it here and I’ll have a look.

As for preferences using the built-in publishing functionality of RapidWeaver or using something like FileZilla: it’s really just a preference. RapidWeaver has grown up in this department, and even though it does occasionally glitch and cough out on you during publication, it’s usually an easy way to publish your site. My main gripe is that the error messages usually don’t give enough info to troubleshoot.

I mainly use FileZilla to modify files directly or to troubleshoot; for publishing I usually use RapidWeaver’s built-in tools.

Cheers,
Erwin

Thanks for that feedback. Here are some questions related to the longer guidance you provided (as promised I would do)…

Regarding this, “My opinion: start a new. Delete the subfolders completely, and open you RW projects one-by-one and check the following….”

Historically, as you can see from my prior posting, I have always sought to place my subdomain sites within the public_html folder. That has virtually always worked but for my recent experiences.

When you say, “Delete the subfolders completely,” I assume that means any and all folders/ files inside of the JustinZdeb.com folder (which is inside of the public_html folder, RIGHT? I will hold off doing this, until you confirm that I have interpreted your guidance correctly.


Referencing your guidance and image related to “sites.netstei.nl/neilmike [PROD]…

I’m not sure what you mean by a “Staging Server;” Does this mean I create a folder inside of Public_html to contain all of my subdomains?

Sorry, I know you are suggesting more security or precision locations, but I’m not sure if I’m truly getting the “structure” recommended. For example is “Domains” the folder inside of public_html? If not what / where is it?

NeilMike

Hi Erwin. I want to follow your guidance, however, I’m hoping you can confirm what I’m asking, before I start deleting items. Sorry to bother you, as I’m sure you have a life beyond helping me :grin:

Thanks.

Hi @NeilMike,

I’m not sure what you mean by a “Staging Server;” Does this mean I create a folder inside of Public_html to contain all of my subdomains?

A staging server is a dedicated webserver that web designers use to allow customers to preview the site they ordered. I just used mine as an example of how I keep the projects I work on separate from each other (and from the other pages I host on that particular webserver).

If you don’t build sites for others, a staging server is unnecessary.

Sorry, I know you are suggesting more security or precision locations, but I’m not sure if I’m truly getting the “structure” recommended. For example is “Domains” the folder inside of public_html? If not what / where is it?

In my particular case, /domains is the primary folder, with a folder for each domain I service. In the folder for each domain I service, is a public_html folder.

Historically, as you can see from my prior posting, I have always sought to place my subdomain sites within the public_html folder. That has virtually always worked but for my recent experiences.

By putting one extra layer between the root (public_html) and the project you’re working on, you’ll have a cleaner “work space” on your folder. The chance that projects accidentally overwrite files is a lot lower too.

I suggest creating a subfolder in public_html (call it “projects” or “sites” or something similar) and putting the projects you work on in folders inside that.

When you say, “Delete the subfolders completely,” I assume that means any and all folders/ files inside of the JustinZdeb.com folder (which is inside of the public_html folder, RIGHT? I will hold off doing this, until you confirm that I have interpreted your guidance correctly.

Yes. Delete the content of the folder named justinzdeb.com, make sure the publishing settings in that project’s file is set to publish to that folder and then re-publish all files from RapidWeaver.

(Or, alternatively, publish to a local folder from within RapidWeaver and then copy over the content using FileZilla).

Cheers,
Erwin

Terrific. Thanks, again for your help.

https://www.dropbox.com/t/nVsBLTnGJA7FSWb7

Hi Erwin. Not there yet. Above is latest version with the only change from v6 being the path. I’ve created a personal folder, neilko, inside of public_html and placed my project JustinZdeb.com inside of that folder. I have not moved any of my other projects at this time to keep it simple. I’ve uploaded a pic of the path.

Per your guidance I deleted anything and everything I could find for JustinZdeb.com and for its predecessor JZmedical.com. I then uploaded my RW file using the publish function inside of RW. Got a 403 error, so I looked at things via FileZilla; folders missing on Hostagtor, so I uploaded via FileZilla and the missing files made it. Tried to open again without success. (403 again)

I suspect it is time to go back to Hostgator support, but I wanted to run things past you bf that in case you see an error in my code or process or something.

As always, thanks for any and all help you may provide.
Screenshot 2023-05-25 at 10.27.05 AM

Hi @NeilMike,

A 403 means that the files or folders are there, but the server won’t allow you to access them. This is usually a permissions problem.

I think at this point it’s wise to have Hostgator have a look from their end. It’s not normal for a webserver to behave this way without you explicitly setting those permissions. The reason why I had you deleting the contents of the folder was to reset everything including permission- permissions shouldn’t survive a deletion of the files they’re set to.

If all else fails - switch hosting providers to one that has their things on order. Chillidog.com comes highly recommended for RapidWeaver users due to their knowledge of the software and their role in developing for it.

Cheers,
Erwin

Noted. Thanks for this latest review and guidance.

Great news! justinzdeb.com up and running, finally. Hostgator found an issue at the “root” and fixed it. Hopefully, it stays fixed :wink:

Separately but related, you recommended I establish a folder inside of public_html to locate all of my subdomains. I just did that. The most complex of those, horlick65.net, gave me a 404 error, so I moved it back outside of my neilko folder and into the public_html folder. Now the 404 error is gone, but the home page not opening properly— see attached image. The pages still work but not the home page. What have I done wrong and how do I fix?

I’m not even looking at the other domains, until I find out how to do this right.

Thanks.

Hi @NeilMike,

Good to hear! I am a bit curious as what the “issue at the root” was, but I’ll have to live with that curiosity :wink:

Oh, and it appears that the 404s from https://horlick65.net have fixed themselves - the page loads correctly on my end.

Cheers,
Erwin

Indeed, I just reloaded, and it is working again. Sadly, it works only outside of my neilko folder. I just tested another one with the same outcome, i.e., not working inside, moved outside, and then working again. I’m guessing I will have to reload directly into the neilko folder to get them to work correctly.

Sorry about the “root” issue, but I had to have him explain a second time, and I still did not understand between the technical nature and my embarrassingly poor ability to understand his fast Indian dialect.

Thanks, yet again, for all of your assistance with my travails.

NeilMike

hi @NeilMike,

My guess is, that if you move the files to a new layer, the links to the CSS and images get broken. This could happen when the images and CSS are expected to be in the Files folder of that project, but are not.

This should work:

  1. Create a folder named after your project’s name in the location you want your site to be

  2. Open the project in RapidWeaver

  3. Click on Publishing in the left side bar

  4. Look for this setting:

  5. Click between the first letter of the current directory’s name and the ‘/’ that precedes it (so, in my example, between the second to last ‘/’ and the ‘s’ of ‘sree’) and type the the name of the new layer, followed by a new ‘/’

So, in my example I want the project to end up in the sites folder, so I change the path from:

/domains/netstek.nl/public_html/sree/ to:
/domains/netstek.nl/public_html/sites/sree/

  1. Now, after saving these changes, I click File > Re-publish all files in RapidWeaver’s menu:

This forces RW to re-upload all files and folders to the new location, breaking all the ties the project has to the Files folder in the root. This should prevent any CSS or images from 404-ing, unless there’s something wrong with how Hostgator set up things.

Keep in mind that caching can prevent you from seeing the latest upload - so it might take a while before you see any effect (like we saw before when you moved the folders around).

Cheers,
Erwin

1 Like