re: https://central.owncloud.org/t/removing-index-php-from-share-links/1085/5
I… followed the instructions here:
https://central.owncloud.org/t/the-requested-uri-login-cannot-be-processed-by-the-script-owncloud-index-php/993
to enable rewrite of sharing link to exclude index.php.
### Steps to reproduce
1. Setup OC 9.0.4
2. Install mod_env and mod_rewrite
3. Modify config.php to include: 'overwrite.cli.url' => 'https://mydomain.com',
4. Modify config.php to include: 'htaccess.RewriteBase' => '/',
5. Execute: occ maintenance:update:htaccess
### Expected behaviour
Sharing urls should not include index.php
### Actual behaviour
Sharing urls do include index.php
### Server configuration
**Operating system**:
Ubuntu 14.04 in Docker container
**Web server:**
Apache 2.4.7
**Database:**
mariadb
**PHP version:**
5.5.9
**ownCloud version:**
9.0.4
**Updated from an older ownCloud or fresh install:**
updated from 9.0.2
**Where did you install ownCloud from:**
downloaded tarball from owncloud site.
**Signing status (ownCloud 9.0 and above):**
No errors have been found.
**List of activated apps:**
```
Enabled:
- activity: 2.2.1
- comments: 0.2
- dav: 0.1.6
- federatedfilesharing: 0.1.0
- federation: 0.0.4
- files: 1.4.4
- files_pdfviewer: 0.8.1
- files_sharing: 0.9.1
- files_texteditor: 2.1
- files_trashbin: 0.8.0
- files_versions: 1.2.0
- files_videoplayer: 0.9.8
- firstrunwizard: 1.1
- gallery: 14.5.0
- notifications: 0.2.3
- provisioning_api: 0.4.1
- systemtags: 0.2
- templateeditor: 0.1
- updatenotification: 0.1.0
Disabled:
- encryption
- external
- files_antivirus
- files_external
- user_external
- user_ldap
```
**The content of config/config.php:**
```
{
"system": {
"instanceid": "oc3k21ml55tl",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "\/var\/www\/owncloud\/data",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "9.0.4.1",
"dbname": "owncloud",
"dbhost": "db",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "UTC",
"installed": true,
"updatechecker": false,
"theme": "",
"loglevel": 0,
"maintenance": false,
"htaccess.RewriteBase": "\/"
},
"apps": {
"activity": {
"enabled": "yes",
"installed_version": "2.2.1",
"types": "filesystem"
},
"backgroundjob": {
"lastjob": "396"
},
"comments": {
"enabled": "yes",
"installed_version": "0.2",
"types": "logging"
},
"core": {
"installedat": "1451998294.744",
"lastcron": "1469611661",
"lastupdateResult": "{\"version\":\"8.2.5\",\"versionstring\":\"ownCloud 8.2.5\",\"url\":\"https:\\\/\\\/download.owncloud.org\\\/community\\\/owncloud-8.2.5.zip\",\"web\":\"https:\\\/\\\/doc.owncloud.org\\\/server\\\/8.2\\\/admin_manual\\\/maintenance\\\/upgrade.html\"}",
"lastupdatedat": "0",
"oc.integritycheck.checker": "[]",
"public_files": "files_sharing\/public.php",
"public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
"remote_caldav": "dav\/appinfo\/v1\/caldav.php",
"remote_calendar": "dav\/appinfo\/v1\/caldav.php",
"remote_carddav": "dav\/appinfo\/v1\/carddav.php",
"remote_contacts": "dav\/appinfo\/v1\/carddav.php",
"remote_dav": "dav\/appinfo\/v2\/remote.php",
"remote_files": "dav\/appinfo\/v1\/webdav.php",
"remote_webdav": "dav\/appinfo\/v1\/webdav.php",
"repairlegacystoragesdone": "yes"
},
"dav": {
"enabled": "yes",
"installed_version": "0.1.6",
"types": "filesystem"
},
"federatedfilesharing": {
"enabled": "yes",
"installed_version": "0.1.0",
"types": ""
},
"federation": {
"enabled": "yes",
"installed_version": "0.0.4",
"types": "authentication"
},
"files": {
"cronjob_scan_files": "500",
"enabled": "yes",
"installed_version": "1.4.4",
"types": "filesystem"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "0.8.1",
"ocsid": "166049",
"types": ""
},
"files_sharing": {
"enabled": "yes",
"installed_version": "0.9.1",
"types": "filesystem"
},
"files_texteditor": {
"enabled": "yes",
"installed_version": "2.1",
"ocsid": "166051",
"types": ""
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "0.8.0",
"types": "filesystem"
},
"files_versions": {
"enabled": "yes",
"installed_version": "1.2.0",
"types": "filesystem"
},
"files_videoplayer": {
"enabled": "yes",
"installed_version": "0.9.8",
"types": ""
},
"files_videoviewer": {
"enabled": "no",
"installed_version": "0.1.3",
"ocsid": "166054",
"types": ""
},
"firstrunwizard": {
"enabled": "yes",
"installed_version": "1.1",
"ocsid": "166055",
"types": ""
},
"gallery": {
"enabled": "yes",
"installed_version": "14.5.0",
"types": ""
},
"notifications": {
"enabled": "yes",
"installed_version": "0.2.3",
"types": "logging"
},
"provisioning_api": {
"enabled": "yes",
"installed_version": "0.4.1",
"types": "prevent_group_restriction"
},
"systemtags": {
"enabled": "yes",
"installed_version": "0.2",
"types": "logging"
},
"templateeditor": {
"enabled": "yes",
"installed_version": "0.1",
"types": ""
},
"updatenotification": {
"enabled": "yes",
"installed_version": "0.1.0",
"types": ""
}
}
}
```
**Are you using external storage, if yes which one:**
Data directory is a host mounted Docker volume
**Are you using encryption:**
no
**Are you using an external user-backend, if yes which one:**
No
### Client configuration
**Browser:**
Chrome 51.0.2704.103 m
**Operating system:**
Windows, Linux, Android (owncloud app v2.0.1)
### Logs
#### Web server error log
```
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.6. Set the 'ServerName' directive globally to suppress this message
[Wed Jul 27 09:24:00.767342 2016] [mpm_prefork:notice] [pid 10] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.17 OpenSSL/1.0.1f configured -- resuming normal operations
[Wed Jul 27 09:24:00.767413 2016] [core:notice] [pid 10] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
```
#### ownCloud log (data/owncloud.log)
```
{"reqId":"8Dn+M6c1bYvvYNB\/rP4y","remoteAddr":"172.18.0.4","app":"no app in context","message":"Current user is not logged in","level":0,"time":"2016-07-27T09:24:22+00:00","method":"GET","url":"\/index.php\/apps\/files\/","user":"--"}
{"reqId":"6a1Fd9iWU5u3NolEKZQj","remoteAddr":"172.18.0.4","app":"core","message":"Generating preview for \"\/Video List.txt.v1467806833\" with \"OC\\Preview\\TXT\"","level":0,"time":"2016-07-27T09:28:04+00:00","method":"GET","url":"\/index.php\/apps\/files_versions\/preview?file=%2FVideo%20List.txt&version=1467806833","user":"redacted"}
{"reqId":"whQK\/y2OtTq6pYJOweBN","remoteAddr":"172.18.0.4","app":"core","message":"Generating preview for \"\/Video List.txt.v1452875093\" with \"OC\\Preview\\TXT\"","level":0,"time":"2016-07-27T09:28:05+00:00","method":"GET","url":"\/index.php\/apps\/files_versions\/preview?file=%2FVideo%20List.txt&version=1452875093","user":"redacted"}
{"reqId":"OizxuCorycRx7SB58+Mo","remoteAddr":"172.18.0.4","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 No 'Authorization: Basic' header found. Either the client didn't send one, or the server is mis-configured\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":188,\"User\":false}","level":0,"time":"2016-07-27T09:28:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
```
#### Browser log
```
no idea how to do this
```