• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Seeing the URL rejected by mod_rewrite

I'm trying to use mod_rewrite statements in .htaccess to block access to a directory of mp3 files.  But the Rewrite_cond statement I have is also blocking the accesses made by an embedded QuickTime player I have  on a page in the directory.  It would be easier to craft a Rewrite_cond statement that would let the player requests through and block browser accesses if I knew what the request from the player  looked like  at the server.  When you put a URL in a browser to access the files the mod_rewrite failure gives you back an error that shows the failing URL,  but when the player makes the access it gets back the failure and then just refuses to come up, without saying anything.  Is there any way I can get Apache to show me the URL from the player that it's rejecting?

Thanks for any ideas.
0
steva
Asked:
steva
1 Solution
 
Steve BinkCommented:
You have a few options:

1) The Apache log.  All requests will go here originally, in their unmodified form.  
2) The rewrite log.  If you light it up, it will show you the original URL, how it is parsed by the various rules, and the final outcome.  Note that this can balloon in size really quickly.
3) Use a server-side dump page to catch the rejected URL and log it with your own custom application.  It doesn't have to be anything fancy...just a small DB that records origination, URL, etc.
0
 
stevaAuthor Commented:
Many thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now