User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Problem with mod_rewrite RewriteCond [or] Page [1]  
philihp
All American
8349 Posts
user info
edit post

In order to keep my .htaccess tidy, I am trying to combine these two rules into one using "[or]" (http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond)

RewriteCond %{REQUEST_METHOD} DELETE
RewriteRule company/(.*) deleteCompany.py?comp_id=$1

RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{QUERY_STRING} _method=DELETE
RewriteRule company/(.*) deleteCompany.py?comp_id=$1


I've tried this...

RewriteCond %{REQUEST_METHOD} DELETE [or]
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{QUERY_STRING} _method=DELETE
RewriteRule company/(.*) deleteCompany.py?comp_id=$1


But it fails when I send the HTTP request DELETE /company/12345 HTTP/1.1.

Thoughts?

[Edited on May 13, 2008 at 5:32 PM. Reason : .]

5/13/2008 5:30:46 PM

gs7
All American
2354 Posts
user info
edit post

Try capitalizing [OR] ?

5/13/2008 5:58:29 PM

 Message Boards » Tech Talk » Problem with mod_rewrite RewriteCond [or] Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.