Solved

ht access rewrite statement help?

Posted on 2011-09-30
3
152 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
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 …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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