Solved

ht access rewrite statement help?

Posted on 2011-09-30
3
150 Views
Last Modified: 2012-05-12
Hi all,

I currently have some images that users have uploaded which I need to display in search results. The problem is that the images are uploaded into the /Secure/Uploads/ folder but the /Secure folder is protected with a security certificate.

This is a problem because my htaccess file in the redirects requests to https and as a result the images requests have  a high http overhead as it negotiates the request. I could simply move the uploads folder out of the protected directory but I'm not sure whether there is a reason for the user uploaded images to be protected by the security certificate?

The secure folder has this in it's htaccess file:

RewriteEngine On

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://www.mysite.co.uk/Secure/$1 [R,L]

Open in new window


Can a modification be made to this rewrite condition to not redirect requests for files in the /Secure/Uploads/ and /Secure/Uploads/Thumbs/ folder?
0
Comment
Question by:Mulith
  • 2
3 Comments
 
LVL 2

Expert Comment

by:scaryskullz
ID: 36892826
You can place a rule to redirect /Secure/Uploads to another port if you wish before this Rule and that will be applied first
0
 
LVL 1

Accepted Solution

by:
Mulith earned 0 total points
ID: 36893170
The redirect is what's causing the delay. Managed to find another solution which is to add a .htaccess file to the directory I want to exclude and in it just add

RewriteEngine Off

Open in new window

0
 
LVL 1

Author Closing Comment

by:Mulith
ID: 36915509
Found another solution while searching online.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question