Solved

MOD_REWRITE on Apache 2.2 not working

Posted on 2011-03-01
5
374 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
[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
  • 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 500 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Suggested Solutions

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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