Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I password protect a single file?


Guest

Recommended Posts

Good day,

 

I've managed to password protect the admin folder, but am having difficulties protecting the configure.php file. It would appear that I can only protect certain folders, but not single files - I'm using one.com as my server.

 

Does anyone know how I can do this manually? Perhaps by editing the .htaccess and .htpasswd files?

 

I'm totally new to this, so I really have no idea what to do :blush:

Link to comment
Share on other sites

No, you can password protect a file. You can change its permissions to read only or add code to it that will require a login to view it though. What is the reason for wanting to do this? That might help in finding the best solution.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 7 months later...

Hello Jack! I think you can advise me on this:

I have developed some javascript's which I need to protect from theft.

Yet, my customers of course need to try before buy.

 

The scripts are stored in a folder catalog/comscripts

 

How do I prevent any visitors to just type in the url in the browsers adress field and thereby steal my work?

 

I have so far prevented right click (which I dont like) and a php script which disable caching.

 

Please advice me

 

Many thanks in advance

 

Sara

Link to comment
Share on other sites

Make an index.php file with the content below:

 

<?php
header("Location: http://www.yoursite.com/catalog/index.php");
?>

(Change the URL to match your domain name)

 

Then put it in your /catalog/comscripts folder.

 

It will prevent "snooping".

 

Anyone just going to http://yourdomain.com/catalog/comscripts will get redirected to your catalog.

;)

 

I'm sure there are other ways.

 

This is just one.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...