Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-12-01 20:55:18 +0300
committerLukas Reschke <lukas@owncloud.com>2015-12-01 21:06:48 +0300
commit002e7197890221d9a24dc987f7a02a958bf3e4c7 (patch)
tree3f6ae05f9faf0d704df5352f268ca4243fdcafd7 /.htaccess
parent8931ba4a0d574a05cf4415f2556bdd3ee0388ba9 (diff)
Set "SetEnv" within base `.htaccess` file
mod_rewrite as used by the front controller may require a `RewriteBase` in case the installation is done using an alias. Since we cannot enforce a writable `.htaccess` file this will move the `front_controller_active` environment variable into the main .htaccess file. If administrators decide to have this one not writable they can still enable this feature by setting the `front_controller_active` environment variable within the Apache config.
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess25
1 files changed, 12 insertions, 13 deletions
diff --git a/.htaccess b/.htaccess
index 5c11eff9f37..d82cb8ade17 100644
--- a/.htaccess
+++ b/.htaccess
@@ -44,19 +44,18 @@
RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
- <IfModule mod_env.c>
- SetEnv front_controller_active true
- RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
- RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
- RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff)$
- RewriteCond %{REQUEST_FILENAME} !/remote.php
- RewriteCond %{REQUEST_FILENAME} !/public.php
- RewriteCond %{REQUEST_FILENAME} !/cron.php
- RewriteCond %{REQUEST_FILENAME} !/status.php
- RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php
- RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php
- RewriteRule .* index.php [PT,E=PATH_INFO:$1]
- </IfModule>
+ # Rewrite rules for `front_controller_active`
+ RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
+ RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
+ RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff)$
+ RewriteCond %{REQUEST_FILENAME} !/remote.php
+ RewriteCond %{REQUEST_FILENAME} !/public.php
+ RewriteCond %{REQUEST_FILENAME} !/cron.php
+ RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php
+ RewriteCond %{REQUEST_FILENAME} !/status.php
+ RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php
+ RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php
+ RewriteRule .* index.php [PT,E=PATH_INFO:$1]
</IfModule>
<IfModule mod_mime.c>