Page 1 of 1

Allow access to one subfolder

Posted: Sat Oct 02, 2021 4:35 pm
by HenrysCat
Hi all, I run my OC on Apache and need to allow access to one subfolder not realated to OC
mydomain.com/thisfolder
I have tried creating an .htaccess file in the folder with

Code: Select all

Order allow,deny
Allow from all
But that did not work, any ideas?
Thanks all

Re: Allow access to one subfolder

Posted: Sat Oct 02, 2021 6:59 pm
by straightlight
HenrysCat wrote:
Sat Oct 02, 2021 4:35 pm
Hi all, I run my OC on Apache and need to allow access to one subfolder not realated to OC
mydomain.com/thisfolder
I have tried creating an .htaccess file in the folder with

Code: Select all

Order allow,deny
Allow from all
But that did not work, any ideas?
Thanks all
cPanel > Addon Domains. You could always look it up on Google on how to create an Addon Domain. Alternatively, you could always create a new service request in the Commercial Support section of the forum to get this done as a custom job.

Re: Allow access to one subfolder

Posted: Sun Oct 03, 2021 3:55 am
by HenrysCat
I don't use cpanel it's terrible and over priced, and I specifically need that one subfolder allowed so an Addon Domain completely irrelevant.

Re: Allow access to one subfolder

Posted: Sun Oct 03, 2021 4:49 am
by straightlight
HenrysCat wrote:
Sun Oct 03, 2021 3:55 am
I don't use cpanel it's terrible and over priced, and I specifically need that one subfolder allowed so an Addon Domain completely irrelevant.
Then look on Google. This forum is about Opencart.

Re: Allow access to one subfolder

Posted: Sun Oct 03, 2021 5:06 am
by HenrysCat
My post is about OC as it's the default OC .htaccess file that's blocking access to the subfolders.

Re: Allow access to one subfolder

Posted: Sun Oct 03, 2021 8:03 am
by straightlight
HenrysCat wrote:
Sun Oct 03, 2021 5:06 am
My post is about OC as it's the default OC .htaccess file that's blocking access to the subfolders.
Please post your .htaccess file.

Re: Allow access to one subfolder

Posted: Sun Oct 03, 2021 3:28 pm
by HenrysCat
straightlight wrote:
Sun Oct 03, 2021 8:03 am
Please post your .htaccess file.
er, it's here
https://www.opencart.com/index.php?route=cms/download
Nothing has changed in mine.

Re: Allow access to one subfolder

Posted: Mon Oct 04, 2021 6:23 pm
by paulfeakins
HenrysCat wrote:
Sun Oct 03, 2021 3:55 am
I don't use cpanel it's terrible and over priced
It's not terrible, it's actually very good, but it is now over-priced after they were bought-out.

Re: Allow access to one subfolder

Posted: Mon Oct 04, 2021 6:24 pm
by paulfeakins
HenrysCat wrote:
Sat Oct 02, 2021 4:35 pm
Hi all, I run my OC on Apache and need to allow access to one subfolder not realated to OC
mydomain.com/thisfolder
You could use a sub-domain instead, or you could search this forum where this has been answered before such as in this post: viewtopic.php?t=200632

Re: Allow access to one subfolder

Posted: Mon Oct 04, 2021 10:25 pm
by by mona
The default .htaccess does not block access to anything except direct access to files with some extensions. As in

Code: Select all

<FilesMatch "(?i)((\.tpl|\.twig|\.ini|\.log|(?<!robots)\.txt))">
	Require all denied
</FilesMatch>
so case insensitive, .tpl, .twig, .ini, .log files and any .txt file except robots.txt

There is no need to allow access to a subfolder unless the parent folder is denied unless your server configuration has provisions.
Then you would use (unless you use an old server version):

Code: Select all

<RequireAll>
	Require all granted
</RequireAll>
In your case that parent folder is the root so I assume it is allowed.