Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

exclude from the rule in the htaccess


Rayzak

Recommended Posts

RewriteEngine         on
RewriteRule        ^(.*)\.jpg                /full/path/www/watermark/image.php?%{REQUEST_FILENAME}

 

 

The thing is, that I got some pictures in this catalog and I don't want this rule to affect them. How to exclude some images from this rule?

Link to comment
Share on other sites

Your question is not very clear.

Perhaps a clarification with additional details is in order.

 

A small bit of advice:

Bumping is not helpful and may actually prevent people from assisting you.

 

HTH,

Robert

Link to comment
Share on other sites

I got directory IMAGES and want to use watermark on the server images.

Above code should be placed in htaccess, but it affect all files in IMAGES directory and watermark placed on ALL images, even logo. So, I want to find the way how to exclude some images from this rule, because it would be easier than placing all my graphics to other folder and redo all paths in osc.

Link to comment
Share on other sites

There are three paths you can follow:

1. Move the files that you do not want to be watermarked to another folder.

2. Rename the files to something unique that would not get picked up by a modified regex.

3. Open the image.php file and make a modification to skip over a list of files.

 

Personally, I would choose option 3, but I do not use a watermark nor do I know which contribution that you used. Perhaps someone else could be more helpful.

 

HTH,

Robert

Link to comment
Share on other sites

  • 3 weeks later...
There are three paths you can follow:

1. Move the files that you do not want to be watermarked to another folder.

2. Rename the files to something unique that would not get picked up by a modified regex.

3. Open the image.php file and make a modification to skip over a list of files.

 

Personally, I would choose option 3, but I do not use a watermark nor do I know which contribution that you used.  Perhaps someone else could be more helpful.

 

HTH,

Robert

 

I would like to know how to block certain images from being watermarked too. Does anyone have an addon for the image.php file that can block certain files from being watermarked? I am using the On The Fly Watermark Enhanced Contribution.

 

 

Thanks,

Eric

Link to comment
Share on other sites

Try this... it is untested since I do not use the contribution:

 

Replace this:

RewriteEngine         on
RewriteRule        ^(.*)\.jpg                /full/path/www/watermark/image.php?%{REQUEST_FILENAME}

 

With:

RewriteEngine         on
RewriteRule        ^.*-.*\.jpg   - [L]           
RewriteRule        ^(.*)\.jpg                /full/path/www/watermark/image.php?%{REQUEST_FILENAME}

 

This change should stop processing rewrite rules when a dash is encountered.

 

Let me know if it works,

Robert

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...