[Owncloud] urlrouting

Frank Karlitschek frank at owncloud.org
Wed Mar 14 12:49:48 UTC 2012

On 14.03.2012, at 01:46, Roland van Laar <roland at micite.net> wrote:

> Hello,

Hi Roland,

thank you for your contribution.

> I added a url routing feature to owncloud.
> For now only the root index and the files/index.php work.
> lib/setup.php is also patched to setup a correct .htaccess when it's deployed behind Apache.

How does it work if ownCloud is running on a webserver other than apache or if rewrite support is not installed or the user is not allowed to configure rewrites in .htaccess or can´t use .htaccess files at all?

One of the main design goal of ownCloud is that is should run on as many servers as possible without problems and don´t require manual configuration from the user.

> One of the reasons to add urlrouting is to allow for cleaner urls in owncloud.
> It's now possible to remove the .php ending for example.
> Another reason is increased security because with urlrouting only files
> included in the url patterns are called from apache.
> The other files, such as 3rd party libraries are now only accessible via code.

I don´t really see the benefit for ownCloud here. ownCloud is a personal space for files and data and not a public website. So we don´t need to care about SEO urls or Google or how convenient it is to remember, tweet or mail urls. I agree that shorter urls without .php are prettier from an esthetics standpoint but this benefit is not strong enough to justify to make ownCloud incompatible with a lot of our users.

> A dispatch.php is added which becomes the starting point for all non img,ajax, css and js requests.
> dispatch.php contains the starting point for urls.
> An example url patterns:
> $urlPatterns = Array(
>    Array('url' => '^/$', 'file' => 'index.php'),
>    Array('url' => '^/index.php$', 'file' => 'index.php'),
>    Array('url' => '^/files', 'dir_include' => 'files/'),
> );
> It's possible to include urls.php files in other directories via the
> 'dir_include' => dir_name syntax in the Array.
> The code: https://gitorious.org/~rvanlaar/owncloud/rvanlaars-owncloud-urlrouting
> What do you think?
> Is this something that has the potential to be included in owncloud?

I´m really sorry to say but I think that your proposal is not suitable for ownCloud at the moment.
I hate to say this to a new contributor but I hope you understand the reason.

I suggest to post to this mailing-list earlier next time if you propose big architectural changes so that we can discuss this before you spend a lot of time coding. :-)

There are a lot of areas in ownCloud where we need help.

If you need some inspiration you can have a look at:
http://owncloud.org/dev/junior-jobs/  or

It would be awesome if you would help us to improve ownCloud in other areas and become a contributor.

Thanks a lot :-)


More information about the Owncloud mailing list