Post by kingcoin » Sat Dec 04, 2021 2:56 am

Hi,

I setup .htaccess on my server but I still can direct access .twig file. Even demo OpenCart have the same problem. You can check it here:
https://demo.opencart.com/catalog/view/ ... /edit.twig

How can I fix it? Please help. Thank you.

Newbie

Posts

Joined
Sat Dec 04, 2021 2:50 am

Post by mikeinterserv » Sat Dec 04, 2021 4:03 am

Well - it doesn't matter really
All the files are available in any OC download.
Its no different from view source of html - pretty harmless

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by kingcoin » Tue Dec 07, 2021 5:05 pm

But does it mean .htaccess didn't work? Because these lines in .htaccess

Code: Select all

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.twig|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
It should prevent direct access to .twig files

Newbie

Posts

Joined
Sat Dec 04, 2021 2:50 am

Post by xxvirusxx » Tue Dec 07, 2021 5:48 pm

Yes, should work.
But you are sure htaccess is .htaccess and not .htaccess.txt ?

Apache or Nginx?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: Ahrefs [Bot] and 33 guests