Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 5th, 2009, 05:27 PM
deanbayley's Avatar
deanbayley deanbayley is offline
Disturbed
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Somewhere In the Great Unknown
Posts: 494 deanbayley User rank is Corporal (100 - 500 Reputation Level)deanbayley User rank is Corporal (100 - 500 Reputation Level)deanbayley User rank is Corporal (100 - 500 Reputation Level)deanbayley User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 1 h 11 m 46 sec
Reputation Power: 8
Send a message via ICQ to deanbayley
mod_rewrite - Rule not working on production server

Hi Guys,

I'm trying to get a rule working on our production server, it works fine on my WAMP server but not on our main server (Ensim 10.3 RHEL)

Code:
RewriteEngine On
RewriteRule \.exe /download/ [L]


On my dev server it works fine, *.exe is redirected to /download/

On the production server any files that exist are downloaded, if they don't exist they are redirected to /download/..

Also, I want to prevent users from downloading exe's directly, my idea was to make the above rule conditional if the referer was something like /download/ok/..

Is there a way to read from $_SESSION in mod_rewrite?
__________________
Put your hand on a hot stove for a minute, and it seems like an hour.
Sit with a pretty girl for an hour and it seems like a minute.
That's relativity.
- Albert Einstein

while($girl=='ugly')
{
$alcohol++;
}

Reply With Quote
  #2  
Old June 6th, 2009, 05:38 AM
Sarah_S Sarah_S is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 197 Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level)Sarah_S User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 3 Days 54 m 11 sec
Reputation Power: 275
Hello,

> Is there a way to read from $_SESSION in mod_rewrite?
I have not tried this myself, but please have a look at apache_setenv() and apache_note().

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > mod_rewrite - Rule not working on production server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
Stay green...Green IT