apache - rewrite URL for PUT request -


I changed the way my URL is working on my server now it is www.myserver.com Instead of www.myserver.com/test/service

I've added one of my redirect match 301 www.myserver.com/ Test to at www.myserver.com /

Apache cone file to redirect any access. I am receiving the file on this example for example by a HTTP PUT server on this URL: www.myserver.com/test/service/put/myfile.xml

file The sending server can not handle this 301 HTTP status code so that the file no longer arrives.

Is there a way to rewrite the URL, when there is a PUT request to not leave a file?

Update:

Update Benjamin


:

After revoking it is the content of the revival:

  RewriteEngine RewriteCond% {REQUEST_METHOD} = RewriteRule put ^ / test /(k*) / $ 1 [PT]  

log:

< pre> XX.XXX.XXX .XXX - - [16 / May / 2010: 06: 33: 40 +0000] [www.myserver.com/sid#7f378508aa30] [rid # 7f378538a828 / initial] (2) Engine rewriting requested with uri /test/service/put/myfile.xml XX.XXX.XXX.XXX - [16 / May / 2010: 06:33: 40 + 0000] [www.myserver.com/sid# 7f378508aa30] [Ridework # 7f378538a828 / initial] (3) To apply 'Pattern' ^ / test /(.*) 'Yuri' /test/service/put/myfile.xml 'XX.XXX.XXX.XXX - - [16 / May / 2010: 06: 33: 40 +0000] [www.myserver.com/sid#7f378508aa30][rid#7f378538a828/initial] (4) RewriteCond: put input = '' pattern = '= PUT' = & gt; Matching XX.XXX.XXX.XXX - - [16 / May / 2010: 06:33:33:40 +0000] [www.myserver.com/sid#7f378508aa30] [rummage # 7f378538a828 / initial] (2) rewrite '/' Test /service/put/myfile.xml '- & gt; '/service/put/myfile.xml' XX.XXX.XXX.XXX - - [16 / May / 2010: 06: 33: 40 +0000] [www.myserver.com/sid#7f378508aa30][rid#7f378538a828/ Initial] (2) '/service/put/myfile.xml' to pass through the next API URI-to-filename handler XX.XXX.XXX.XXX - - [16 / May / 2010: 06: 33: 40] To force ' +0000 with the request] [www.myserver.com/sid#7f378508aa30][rid#7f3785393858/subreq] (2) rewriting the init engine uri /service/put/myfile.xml XX.XXX.XXX.XXX - [16 / May / 2010: 06:33:33: 40 + 0000] [www.myserver.com/sid#7f378508aa30] [rummage # 7f3785393858 / subreq] (3) Applying pattern '^ / test /(.*) For 'Yuri' / service /put/myfile.xml 'XX.XXX.XXX.XXX - - [16 / May / 2010: 06: 33: 40 +0000] [www.myserver.com/sid#7f378508aa30] [ Remove # 7f3785393858 / subreq] (1) pass through /service/put/myfile.xml

UPDATE 2:

Apache configuration: < / p>

  RewriteEngine on RewriteLog "/etc/httpd/logs/rewrite.log" RewriteLogLevel 9 RewriteCond% {REQUEST_METHOD} = put RewriteRule ^ / test /(k*) / $ 1 [PT] RedirectMatch 301 ^ / Tester N / a.*)$ http: // w Ww.myserver.com/$1 AliasMatch ^ / style /(.*)?$ "/ var / www / test / www / style / $ 1" alias match ^ / js /(.*)?$ "/ var / www / test / Www / js / $ 1" alias match ^ / min /(.*)?$ "/ var / www / test / www / min / $ 1" alias Match ^ / download /(.*)?$ "/ var / www / test / www / downloads / $ 1" aliases match ^ / image /(.*)?$ "/ var / www / test / www / images / $ 1 "Alias ​​Match ^ / Chart /(.*)?$" / var / www / test / Www / article / $ 1 "Alliance Match ↑ (/.*)? $ "/var/www/test/www/index.php$1" & lt; Directory "/ var / www / test" & gt; Allow override is not allowed by anyone & lt; / Directory & gt;  

with there:

  rewrite RewriteCond% {REQUEST_METHOD} = put rewrite ^ / test /(.*) / $ 1  

Comments