Rewrite works, but still index.php in filelisting


#1

Nextcloud version (eg, 10.0.2): 12.0.4
Operating system and version (eg, Ubuntu 16.04): Ubuntu 17.10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.27
PHP version (eg, 5.6): PHP 7.1.11-0ubuntu0.17.10.1

The issue you are facing:
Rewriting URL without index.php works fine.
But in file-listings my browser shows URLs with index.php.
For example https://toothless.goip.de/index.php/apps/files?dir=//Videos
while Browser says https://toothless.goip.de/apps/files/?dir=/Videos&fileid=135

config.php:

<?php $CONFIG = array ( [...] 'trusted_domains' => array ( 1 => 'toothless.goip.de', ), 'datadirectory' => '/mnt/Nextcloud', 'overwrite.cli.url' => 'https://toothless.goip.de', 'htaccess.RewriteBase' => '/', 'dbtype' => 'mysql', 'version' => '12.0.4.3', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'installed' => true, 'skeletondirectory' => '', 'logtimezone' => 'Europe/Berlin', 'log_type' => 'errorlog', 'memcache.local' => '\\OC\\Memcache\\APCu', [...] );

#2

have exactly the same issue, my config.php also includes

‘htaccess.RewriteBase’ => ‘/’,

but url always contains index.php!


#3

I am experiencing the same thing. I don’t log into the instance very often, except to update it, but noticed it today. Between now and the previous login, I had performed some debian updates. I have the same thing going on with another instance after debian updates as well.

Here are some relevant apache logs. In these logs, notice that the 4th line mentions “nc-server”, but the subdomain is actually “share.”

[Tue Jan 09 19:30:03.298259 2018] [core:trace5] [pid 1459] protocol.c(645): [client ::1:58070] Request received from client: OPTIONS * HTTP/1.0
[Tue Jan 09 19:30:03.298389 2018] [http:trace4] [pid 1459] http_request.c(420): [client ::1:58070] Headers received from client:
[Tue Jan 09 19:30:03.298420 2018] [http:trace4] [pid 1459] http_request.c(424): [client ::1:58070]   User-Agent: Apache/2.4.25 (Debian) OpenSSL/1.0.2l (internal dummy connection)
[Tue Jan 09 19:30:03.298447 2018] [rewrite:trace8] [pid 1459] mod_rewrite.c(477): [client ::1:58070] ::1 - - [nc-server.ourdomain.com/sid#7f12a4c61f08][rid#7f12a4c61f08/initial] Declining, request-URI '*' is not a URL-path. Consult the manual entry for the RewriteOptions directive for options and caveats about matching other strings.
[Tue Jan 09 19:30:03.298533 2018] [http:trace3] [pid 1459] http_filters.c(1089): [client ::1:58070] Response sent with status 200, headers:
[Tue Jan 09 19:30:03.298566 2018] [http:trace5] [pid 1459] http_filters.c(1096): [client ::1:58070]   Date: Wed, 10 Jan 2018 01:30:03 GMT
[Tue Jan 09 19:30:03.298578 2018] [http:trace5] [pid 1459] http_filters.c(1099): [client ::1:58070]   Server: Apache/2.4.25 (Debian)
[Tue Jan 09 19:30:03.298588 2018] [http:trace4] [pid 1459] http_filters.c(918): [client ::1:58070]   Content-Length: 0
[Tue Jan 09 19:30:03.298597 2018] [http:trace4] [pid 1459] http_filters.c(918): [client ::1:58070]   Connection: close
[Tue Jan 09 19:30:03.298630 2018] [core:trace6] [pid 1459] core_filters.c(525): [client ::1:58070] core_output_filter: flushing because of FLUSH bucket
[Tue Jan 09 19:30:03.298735 2018] [core:trace6] [pid 1459] core_filters.c(525): [client ::1:58070] core_output_filter: flushing because of FLUSH bucket

#4

Could someone from the Nextcloud team please take a look at this?


#5

Raise an issue:

I see this too however it has zero impact on anything except maybe when trying to share direct links (right click > copy link location).


#6

You are right.
But rewriting is not implemented consequently.

I opened an issue.


#7

Did you try this occ command ? :

occ maintenance:update:htaccess

Then restart apache2 or ngnix and restart your web browser.


#8

That’s not relevant to this particular issue