Solved

ht access rewrite statement help?

Posted on 2011-09-30
3
146 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
Comment Utility
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
Comment Utility
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
Comment Utility
Found another solution while searching online.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now