Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a REST api that is invoked by a Javascript Web application. HTML/CSS and JS files are stored locally and served by Apache, and the REST api is invoked with a ProxyPass directive by Apache on a remote HTTP server. This is my actual httpd.conf file (development machine is on windows):

<VirtualHost *:80>
    DocumentRoot C:\myapp

    <Directory />
        Allow from all

    RewriteLog C:\Temp\rewrite.log
    RewriteLogLevel 0
    RewriteEngine On

    # Let apache serve static files
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
    RewriteRule (.*) $1 [L]

    ProxyPass / retry=0
    ProxyPassReverse /
    ProxyPreserveHost on

My problem is that the remote server ( does not support DELETE and PUT requests (I get a Method not allowed error if I try to do that). Unfortunately i don't have access to that server, but I can develop the REST api exposed by it. What I would like to do is

  • check if the incoming request is DELETE or PUT
  • set an HTTP header on the request X-ORIGINAL-REQUEST_METHOD: DELETE
  • forward the request to the remote server ( as POST

can this somehow be done with Apache rewrite rules or some other module?

share|improve this question
That sounds like an ugly hack. Having those methods working is kinda a must for a REST API - is it blocking them intentionally? What HTTP server software is it running? – Shane Madden Jan 27 '12 at 23:55
Yes, it's an ugly hack I know, but as a workaround it should work, if I can get it working that way. The HTTP server software is the "Oracle Embedded PL/SQL Gateway". – Simon Jan 30 '12 at 10:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.