ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php
+Redirect 301 /apps/calendar/caldav.php /remote/caldav.php
+Redirect 301 /apps/contacts/carddav.php /remote/carddav.php
+Redirect 301 /apps/files/webdav.php /remote/webdav.php
+Redirect 301 /files/webdav.php /remote/webdav.php
<IfModule mod_php5.c>
php_value upload_max_filesize 512M
php_value post_max_size 512M
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
-RewriteRule ^.well-known/carddav /apps/contacts/carddav.php [R]
-RewriteRule ^.well-known/caldav /apps/calendar/caldav.php [R]
+RewriteRule ^.well-known/carddav /remote/carddav.php [R]
+RewriteRule ^.well-known/caldav /remote/caldav.php [R]
</IfModule>
-Options -Indexes
+Options -Indexes
\ No newline at end of file
--- /dev/null
+<?php
+if(!file_exists(OC::$WEBROOT.'/remote/caldav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/caldav.php', file_get_contents(OC::$APPROOT . '/apps/calendar/appinfo/remote.php'));
+}
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Copyright (c) 2011 Jakob Sack <mail@jakobsack.de>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+// Do not load FS ...
+$RUNTIME_NOSETUPFS = true;
+require_once('../lib/base.php');
+
+OC_Util::checkAppEnabled('calendar');
+
+// Backends
+$authBackend = new OC_Connector_Sabre_Auth();
+$principalBackend = new OC_Connector_Sabre_Principal();
+$caldavBackend = new OC_Connector_Sabre_CalDAV();
+
+// Root nodes
+$nodes = array(
+ new Sabre_CalDAV_Principal_Collection($principalBackend),
+ new Sabre_CalDAV_CalendarRootNode($principalBackend, $caldavBackend),
+);
+
+// Fire up server
+$server = new Sabre_DAV_Server($nodes);
+$server->setBaseUri(OC::$WEBROOT.'/remote/caldav.php');
+// Add plugins
+$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
+$server->addPlugin(new Sabre_CalDAV_Plugin());
+$server->addPlugin(new Sabre_DAVACL_Plugin());
+$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
+
+// And off we go!
+$server->exec();
$r = $stmt->execute(array($color,$id));
}
}
+if(!file_exists(OC::$WEBROOT.'/remote/caldav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/caldav.php', file_get_contents(OC::$APPROOT . '/apps/calendar/appinfo/remote.php'));
+}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * Copyright (c) 2011 Jakob Sack <mail@jakobsack.de>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-// Do not load FS ...
-$RUNTIME_NOSETUPFS = true;
-require_once('../inc.php');
-
-OC_Util::checkAppEnabled('calendar');
-
-// Backends
-$authBackend = new OC_Connector_Sabre_Auth();
-$principalBackend = new OC_Connector_Sabre_Principal();
-$caldavBackend = new OC_Connector_Sabre_CalDAV();
-
-// Root nodes
-$nodes = array(
- new Sabre_CalDAV_Principal_Collection($principalBackend),
- new Sabre_CalDAV_CalendarRootNode($principalBackend, $caldavBackend),
-);
-
-// Fire up server
-$server = new Sabre_DAV_Server($nodes);
-$server->setBaseUri(OC::$APPSWEBROOT.'/apps/calendar/caldav.php');
-// Add plugins
-$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
-$server->addPlugin(new Sabre_CalDAV_Plugin());
-$server->addPlugin(new Sabre_DAVACL_Plugin());
-$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
-
-// And off we go!
-$server->exec();
--- /dev/null
+<?php
+if(!file_exists(OC::$WEBROOT.'/remote/carddav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/carddav.php', file_get_contents(OC::$APPROOT . '/apps/contacts/appinfo/remote.php'));
+}
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * ownCloud - Addressbook
+ *
+ * @author Jakob Sack
+ * @copyright 2011 Jakob Sack mail@jakobsack.de
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+// Do not load FS ...
+$RUNTIME_NOSETUPFS = true;
+require_once('../lib/base.php');
+
+OC_Util::checkAppEnabled('contacts');
+
+// Backends
+$authBackend = new OC_Connector_Sabre_Auth();
+$principalBackend = new OC_Connector_Sabre_Principal();
+$carddavBackend = new OC_Connector_Sabre_CardDAV();
+
+// Root nodes
+$nodes = array(
+ new Sabre_CalDAV_Principal_Collection($principalBackend),
+ new Sabre_CardDAV_AddressBookRoot($principalBackend, $carddavBackend),
+);
+
+// Fire up server
+$server = new Sabre_DAV_Server($nodes);
+$server->setBaseUri(OC::$WEBROOT.'/remote/carddav.php');
+// Add plugins
+$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
+$server->addPlugin(new Sabre_CardDAV_Plugin());
+$server->addPlugin(new Sabre_DAVACL_Plugin());
+$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
+
+// And off we go!
+$server->exec();
--- /dev/null
+<?php
+if(!file_exists(OC::$WEBROOT.'/remote/carddav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/carddav.php', file_get_contents(OC::$APPROOT . '/apps/contacts/appinfo/remote.php'));
+}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * ownCloud - Addressbook
- *
- * @author Jakob Sack
- * @copyright 2011 Jakob Sack mail@jakobsack.de
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-// Do not load FS ...
-$RUNTIME_NOSETUPFS = true;
-require_once('../inc.php');
-
-OC_Util::checkAppEnabled('contacts');
-
-// Backends
-$authBackend = new OC_Connector_Sabre_Auth();
-$principalBackend = new OC_Connector_Sabre_Principal();
-$carddavBackend = new OC_Connector_Sabre_CardDAV();
-
-// Root nodes
-$nodes = array(
- new Sabre_CalDAV_Principal_Collection($principalBackend),
- new Sabre_CardDAV_AddressBookRoot($principalBackend, $carddavBackend),
-);
-
-// Fire up server
-$server = new Sabre_DAV_Server($nodes);
-$server->setBaseUri(OC::$APPSWEBROOT.'/apps/contacts/carddav.php');
-// Add plugins
-$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
-$server->addPlugin(new Sabre_CardDAV_Plugin());
-$server->addPlugin(new Sabre_DAVACL_Plugin());
-$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
-
-// And off we go!
-$server->exec();
--- /dev/null
+<?php
+if(!file_exists(OC::$WEBROOT.'/remote/webdav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/webdav.php', file_get_contents(OC::$APPROOT . '/apps/files/appinfo/webdav.php'));
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * ownCloud
+ *
+ * @author Frank Karlitschek
+ * @author Jakob Sack
+ * @copyright 2010 Frank Karlitschek karlitschek@kde.org
+ * @copyright 2011 Jakob Sack kde@jakobsack.de
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Do not load FS ...
+$RUNTIME_NOSETUPFS = true;
+
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem','authentication');
+
+
+
+// Backends
+$authBackend = new OC_Connector_Sabre_Auth();
+$lockBackend = new OC_Connector_Sabre_Locks();
+
+// Create ownCloud Dir
+$publicDir = new OC_Connector_Sabre_Directory('');
+
+// Fire up server
+$server = new Sabre_DAV_Server($publicDir);
+$server->setBaseUri(OC::$WEBROOT.'/remote/webdav.php');
+
+// Load plugins
+$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
+$server->addPlugin(new Sabre_DAV_Locks_Plugin($lockBackend));
+$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
+
+// And off we go!
+$server->exec();
--- /dev/null
+<?php
+if(!file_exists(OC::$WEBROOT.'/remote/webdav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/webdav.php', file_get_contents(OC::$APPROOT . '/apps/files/appinfo/webdav.php'));
+}
\ No newline at end of file
+++ /dev/null
-<?php
-
-/**
- * ownCloud
- *
- * @author Frank Karlitschek
- * @author Jakob Sack
- * @copyright 2010 Frank Karlitschek karlitschek@kde.org
- * @copyright 2011 Jakob Sack kde@jakobsack.de
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-// Do not load FS ...
-$RUNTIME_NOSETUPFS = true;
-require_once('../inc.php');
-
-// only need filesystem apps
-$RUNTIME_APPTYPES=array('filesystem','authentication');
-
-
-
-// Backends
-$authBackend = new OC_Connector_Sabre_Auth();
-$lockBackend = new OC_Connector_Sabre_Locks();
-
-// Create ownCloud Dir
-$publicDir = new OC_Connector_Sabre_Directory('');
-
-// Fire up server
-$server = new Sabre_DAV_Server($publicDir);
-$server->setBaseUri(OC::$APPSWEBROOT.'/apps/files/webdav.php');
-
-// Load plugins
-$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
-$server->addPlugin(new Sabre_DAV_Locks_Plugin($lockBackend));
-$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
-
-// And off we go!
-$server->exec();
+++ /dev/null
-<?php require_once('/Applications/MAMP/htdocs/owncloud/lib/base.php'); ?>
\ No newline at end of file
// Handle WebDAV
if($_SERVER['REQUEST_METHOD']=='PROPFIND'){
- header('location: '.OC_Helper::linkToAbsolute('files','webdav.php'));
+ header('location: '.OC_Helper::linkToAbsolute('remote','webdav.php'));
exit();
}
exit;
}
}
- //update path to lib base
- @file_put_contents(OC::$APPSROOT . '/apps/inc.php', '<?php require_once(\'' . OC::$SERVERROOT . '/lib/base.php' . '\'); ?>');
}
}