Post by Cleo » Fri Dec 22, 2017 3:41 pm

Hello,

I was using this .htaccess in the catalog folder:

Code: Select all

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !^(.+)\.jpg$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.JPG$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.jpeg$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.JPEG$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.png$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.PNG$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.gif$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.GIF$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.css$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.js$
RewriteRule ^(.+)$ /circkel/ [NC]
But people cannot use the Make an Offer feature because they are getting the "page not found"

I tried to change the .htaccess with the following content:

Code: Select all

<FilesMatch "\.(php|tpl|txt)$">
Order Deny,Allow
Deny from all
Allow from "my static ip"
</FilesMatch>
And of course it's the same problem.

The files for the Make an offer feature are in the subfolder: /catalog/model/myoffer

I believe I can probably add a .htaccess file in every subfolder except the /myoffer one instead of one in the catalog folder but I was wondering if I could add a rule (and which rule) to the .htaccess file instead to prevent the error when someone try to make an offer?

Thank you
Last edited by Cleo on Thu Jun 07, 2018 10:45 am, edited 2 times in total.

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am

Post by DevmanExtensions » Sun Dec 24, 2017 12:53 am

Hi!

If you rename ".htaccess" to ".htaccess_" (with a line in end name) the problem is solved?? maybe is not a problem from .htaccess.

Thanks!

Image
Visit my website!
Visit my extensions shop and get discounts!
Know testominials!


User avatar

Posts

Joined
Sun Dec 24, 2017 12:32 am


Post by Cleo » Mon Dec 25, 2017 10:35 am

Hi,

Thank you for the reply, the problem is: I don't want to disable the .htaccess file, I added it to the catalog folder to prevent access to it, if I do as you suggested the .htaccess will be disable which I don't want.

The files for the extension called "Make an Offer" are in a subfolder in the catalog folder and the .htaccess is preventing access to the catalog folder and all the subfolders so the "Make an Offer" feature/extension cannot be use.

So because I don't want to remove/disable the .htaccess file from the catalog folder because I want to prevent access to it I was wondering if a rule could be add to the .htaccess file that would still prevent access to the folder but would make the use of the feature enable.

So what I need is a just a rule that I can add to the .htaccess file in the catalog folder that would still prevent access to it but make an exception for the "subfolder Make an Offer" so people would be able to use the "Make an Offer" feature.

Maybe I explained it better this time?

Tks

Cleo

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am

Post by Cleo » Sun Mar 04, 2018 3:58 pm

Any .htaccess expert? :crazy:

Tks,
Cleo

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am

Post by ADD Creative » Fri Mar 09, 2018 7:35 pm

Have you tried adding to following just before your RewriteRule?

Code: Select all

RewriteCond %{REQUEST_URI} !^/catalog/model/myoffer/.*$
Or you could also try putting a new .htaccess file in the folder you want to ignore with.

Code: Select all

RewriteEngine Off
However it does not seem right that any assess should be required to catalog/model/myoffer. Any acces should go through index.php?route=. What is being accessed in this directory?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Cleo » Sat Mar 10, 2018 10:04 am

Hello ADD Creative and thank you for the reply and suggestion. I will try both of them.
The subfolder contain a file (script) which bring up a pop up form that the customers need to fill with their offer (hope I am explaining it right?) If not you may try it
http://www.lesbricollesdecleo.ca/home-a ... -2010-2011
to see for yourself!

Thank you

Cleo

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am

Post by MrPhil » Sat Mar 10, 2018 11:03 pm

By the way, the code in your original post is way bloated, and could be cut down to:

Code: Select all

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !\.(jpe?g|png|gif|css|js)$  [NC]
RewriteRule ^(.+)$ /circkel/
Do you have files with both lowercase and UPPERCASE extensions, and your operating system treats them the same (Windows) or as different (Linux)? Do you really care if there is at least one character before the extension?

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by Cleo » Sun Mar 11, 2018 2:37 pm

Hello,
The code in my original post was the one suggested in an old thread "How to make opencart more secure" or something like that and I never change it because I am not a programmer and don't know much about coding etc. I read a lot in the forum, take good suggestion from people who knows what they are doing (like you, ADD Creative and others) and ask question when I don't find what I need which is not often because the forum is filled with good information from competent people, if we take the time to search we normally find the necessary information when it concerns oc . For the "big problem" I usually hire someone who knows what he is doing to make sure I don't mess everything on my site.

I put an .htaccess in the "Make an offer folder" with the code you suggest "RewriteEngine Off" and tried to make an offer from my cell to have a different IP then the one from my pc and it seems to work.

I don't think I have l UPPERCASE extensions, I always try to keep everything with lowercase, so I should be able to change the .htaccess content with the codes you suggest!

Regards,
Cleo

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am

Post by IP_CAM » Mon Mar 12, 2018 11:15 am

I just made a Test, and it all looks well, exept for the quantity, wich is not mentioned
in the Confirmation Info.
Ernie
---
PS: and this is what I got just now in my email:

Code: Select all

Hello Ernie!
Thank you for making an offer on product (Avon Mrs Albee President's Club Plate 2010-2011).
Unfortunately we cannot accept your offer. 
Original price: $ 5.00 usd
Your offer: $  usd1.00
Minimum we would accept: $  usd4.00.
Link to product:http://www.lesbricollesdecleo.ca/home-and-garden/collectibles/avon-mrs-albee-presidents-club-plate-2010-2011&product_id=387
End of message
Image

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Cleo » Mon Mar 12, 2018 11:43 am

Hello IP_CAM,

Thank you very much for your help by trying it! Now I am sure that it is working, by just adding a new .htaccess in the subfolder as suggested ;D

I didn't change the original (main) .htaccess yet to make it smaller because I didn't want to make 2 change at the same time because if something would have go wrong it would have been more trouble to find out which .htaccess was creating a problem.

Now that someone else tried it I can change the main one.

Kind regards,
Cleo

PS: As for the quantity maybe it's because there is only one available?

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am
Who is online

Users browsing this forum: No registered users and 33 guests