Forums / General Questions / using a new .htaccess file to allow specific access?

using a new .htaccess file to allow specific access?

Locked

Views: 959

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
7 May 2010, 9:00 AM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

using a new .htaccess file to allow specific access?

Hi,
In a product description text I have an embedded link.

This opens a javascript popup next to the product description which loads an html file from

includes/languages/english/html_includes/CUSTOM/ht_product_advisor_en.html

(this file loads a constantly-updated swf reference file from a supplier).

Sounds a bit convoluted but it works very well. Or rather it did.

Now with the 139b .htaccess restrictions this direct access is blocked.

If I put another .htaccess file in the includes/languages/english/html_includes/CUSTOM/ directory containing this code:

<FilesMatch "ht_product_advisor_en.html">
  Allow from all
</FilesMatch>

It works fine.

So my questions are

  1. Is there are better solution for the whole idea?
  2. If not, is the .htaccess code ok or should I be putting this html file somewhere else completely (download folder?)

Thanks

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

7 May 2010, 5:33 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,514
Plugin Contributions:
176

Re: using a new .htaccess file to allow specific access?

I strongly recommend that you relocate your .html file to another folder whose intended purpose IS already for public viewing, such as perhaps the /media/ folder, or create another for that purpose.

The html_includes folder is really only intended for internal system use, and using it for public access is ill-advised, esp since what you've done actually discloses infrastructure details to every visitor, and can thus invite hackers or probing bots, etc.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 May 2010, 6:03 PM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: using a new .htaccess file to allow specific access?

I thought it was wrong,

thanks for the confirmation,

Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...