LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache mod_rewrite question (http://www.linuxquestions.org/questions/linux-software-2/apache-mod_rewrite-question-631820/)

Quantum0726 03-31-2008 01:28 AM

Apache mod_rewrite question
 
Hi, I've been playing with DAViCal lately (http://rscds.sourceforge.net/), and after working through some database permission issues, I have fully syncable calendars between all of my computers. I am running into one issue with the way iCal handles requests, but mod_rewrite should be able to solve the problem.

For some reason, iCal sends a PROPFIND to / (on the Apache server) when creating or deleting calendars. Since the DAViCal application and data are stored at /cal, and a full web site, that doesn't know how to handle PROPFIND requests, is located at the server root, iCal keeps getting 405 errors and pops up a dialog box. Ignoring this requests seems to cause no problem, but it would be nice to silence the dialog box by redirecting any PROPFIND requests on / to /cal.

After researching mod_rewrite, I've come up with the following:
Code:

RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(PROPFIND)$ [NC]
RewriteRule / /cal

This doesn't seem to work though, as I still get the same errors. I've tried commenting out the condition and just browsing to the page normally, but do not get redirected to /cal. I've tried adding ^ and $ around the /, and removing the leading slash from /cal, but in all cases I still see the main page at /. Testing with a more simple rewrite rule that converts *.html to *.php seems to work fine, so I know the rewrite module is loaded and working.

Any ideas on how I can get this to work?

Thanks much!
~Jayson


All times are GMT -5. The time now is 09:51 AM.