Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MOD_REWRITE on Apache 2.2 not working

Posted on 2011-03-01
5
Medium Priority
?
380 Views
Last Modified: 2012-05-11
I am trying to rewrite requests to image files to Rackspace CloudFiles CDN. I tried the following in .htaccess file but no luck

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/files/(.*)$ http://********.rackcdn.com/$1 [R=302,L]

********** = unique Container ID which is present in the actual .htaccess file.
0
Comment
Question by:j_pearcy
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:BigRat
ID: 35019646
>>********** = unique Container ID which is present in the actual .htaccess file.

That I don't understand? How present in the .htaccess file?

But notwithstanding, check that the .htaccess file is in the directory /files and this is directly under the directory sopecified in directory path and that the server has access to the .htaccess file.
(Usual things, I know, but often overlooked).
0
 

Author Comment

by:j_pearcy
ID: 35019685
So even though /files/ is specified the .htaccess file still needs to be inside /files/? I will try that.
0
 
LVL 27

Accepted Solution

by:
BigRat earned 2000 total points
ID: 35019706
One either puts rewrite rules inside httpd.conf (which I always do so that for my sites I always can immediately see what is what) or in the directory in which the URL resolves to (which one always forgets that one has done that)
0
 
LVL 27

Expert Comment

by:BigRat
ID: 35019715
PS the bad news is that it is cheese time here in Europe, so I'm off home for dinner.
0
 

Author Closing Comment

by:j_pearcy
ID: 35020011
You got me headed down the right track. I put the rewrite rule in the httpd.conf file and that led me to find out that my CDN config was wrong.

THANKS!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

885 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