.htaccess file in wrong location


I have tried using the ‘edit’ .htaccess file and whilst it works and uploads it appears to be going to wrong location.

my publishing settings are;
Path: /public_html/
Website addresss: https://www.example.co.uk/

so when I upload my .htaccess file it sits inside public_html however it needs to sit in the directory above that.

Does this mean that I should leave 'Path" as blank and change my website address to;

thanks in advance.


Mine sits inside public_html and works OK. What makes you think it needs to go somewhere else?

looking at my server structure, my existing .htaccess file (which already has some txt for php version inside) is at level above?
I I use the edit function in RW it puts a second .htaccess file within my public_html folder?

How about taking the info in the .htaccess file that’s at the higher level and combining its contents with the one that RW creates in the public_html folder? Then upload that and delete the higher level one.

That’s what I’d try.

Obviously keep backups of everything.


1 Like

As info only… you can use an ftp program and plain text editor to maintain your htaccess file. Every site I’ve had and maintained the file has been in the “public_html” folder. However, it’s my understanding you can have different htaccess files in different folders (levels) but unless you have that special need just the one at the main “public” level.
See this info which is one of many on the web:https://www.whoishostingthis.com/resources/htaccess/

Cheers Greg, much appreciated.
Im a little cautious over my upper level .htaccess file so I presume I can just leave that there?.
Any additional text placed in my .htaccess file created through RW and uploaded to public_html will action any of the new requests I presume?

Thanks again,


I would only assume. I have never used RW to manage my htaccess file and I’ve only ever had one version located in the “main” level. Perhaps others can assist further.

You can have a .htaccess file at every directory if you need to.

Apache will apply the directives for the directory it finds them in as well as any sub directories of the directory that htaccess file is found in.

The primary reason the htaccess file was developed was for securing directory’s and sub-directories. Hence the name “htaccess.

Where did that file come from? Did you create it or did the hosting company (or control panel) place it there?

1 Like

It was placed in there automatically

Automatically I assume means by your host?

Then leave it alone and put yours where RapidWeaver wants to put it. That way when the hosting company (or you via a control panel) changes the PHP version, you won’t override or overwrite each other.

They both should work fine together.

Yes sorry, my host installed it.
Great, thanks for your knowledge.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.