Remove index.php in Url on Hosted Nextcloud


I have my nextcloud in a subdomain on an 1&1 Webspace folder.

Now I try to configure everything in proper way.

As I canot send Instructions to the 1und1 server so Im looking for a way to remove /index.php/ in the Nextcloud URL

Please tel me what to put where to solve this

when creating a new domain / subdomain, an index.php is usually created automatically, which contains e.g. “here will be soon…” or something similar.
Before (!) Nextcloud is installed, this file must be removed. When Nextcloud is installed, a new index.php is created automatically.
This contains the following for me (NC 14.04):

 * Your webserver seems to be not configured to use PHP or PHP is not installed. 
 * Please contact your administrator or follow our documentation: 
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 * @author Georg Ehrke <>
 * @author Joas Schilling <>
 * @author Jörn Friedrich Dreyer <>
 * @author Lukas Reschke <>
 * @author Morris Jobke <>
 * @author Robin Appelman <>
 * @author Sergio Bertolín <>
 * @author Thomas Müller <>
 * @author Vincent Petry <>
 * @license AGPL-3.0
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <>

require_once __DIR__ . '/lib/versioncheck.php';

try {

	require_once __DIR__ . '/lib/base.php';


} catch(\OC\ServiceUnavailableException $ex) {
	\OC::$server->getLogger()->logException($ex, array('app' => 'index'));

	//show the user a detailed error page
	OC_Template::printExceptionErrorPage($ex, 503);
} catch (\OC\HintException $ex) {
	try {
		OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), 503);
	} catch (Exception $ex2) {
		try {
			\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
			\OC::$server->getLogger()->logException($ex2, array('app' => 'index'));
		} catch (Throwable $e) {
			// no way to log it properly - but to avoid a white page of death we try harder and ignore this one here

		//show the user a detailed error page
		OC_Template::printExceptionErrorPage($ex, 500);
} catch (\OC\User\LoginException $ex) {
	OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage(), 403);
} catch (Exception $ex) {
	\OC::$server->getLogger()->logException($ex, array('app' => 'index'));

	//show the user a detailed error page
	OC_Template::printExceptionErrorPage($ex, 500);
} catch (Error $ex) {
	try {
		\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
	} catch (Error $e) {
		header('Content-Type: text/plain; charset=utf-8');
		print("Internal Server Error\n\n");
		print("The server encountered an internal error and was unable to complete your request.\n");
		print("Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.\n");
		print("More details can be found in the webserver log.\n");

		throw $e;
	OC_Template::printExceptionErrorPage($ex, 500);

If that wasn’t your question, please describe your problem in more detail.
Wenn das nicht deine Frage war, schildere dein Problem bitte etwas genauer.

Im looking for a way to remove /index.php/ in the Nextcloud URL

in fact shorter url for

Oh, apparently a directory named “index.php” was created (for whatever reason) and the Nextcloud installation was done in it.
You can either redirect your domain to this directory (I don’t know how to do this with 1&1) or delete your installation and run it again in the root directory of your domain.

Ask the support of 1&1 about the domain redirection.

P.S. I just looked again: this is completely normal!
I don’t know now how you could change that.

There are many descriptions out there but not for hosted installations

Which webserver is in use?

I only know a way to enable this on Apache via .htaccess:

  • Okay the occ command requires terminal access again, but one can manually add the resulting rewrite rules manually as well. Will check out tomorrow.

On Nginx AFAIK or can only be enabled via direct webserver config.

THX for taking care
Now I have in htaccess:


RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Header set Strict-Transport-Security “max-age=31536000; includeSubDomains; preload” env=HTTPS

ErrorDocument 403 //
ErrorDocument 404 //

Jep that is what should work on Apache webserver, but other webserver do not read .htaccess files.

Note that with preload option your domain might get added to the list, so you will not be able to access it without https anymore. This is generally fine, but I think everyone should know, since I see this in so many guides without further explanation.

Happy Christmas holidays btw to all :smiley::christmas_tree:

I added this lines to have https without this it was http
so the server is reading the htaccess - which is good
but there is still index.php in the url!

Im looking for a way to remove /index.php/ in the Nextcloud URL

in fact shorter url for

I searched for the same. the most answers wasn’t helpful in this point.

By tryout i checked, that the load without the /index.php/ part works.

i found my solution in the config.sample.php

’htaccess.IgnoreFrontController’ => false,

i added the line in my config and changed it to true.

It works like charme, doesn’t through any errors.
I still have to check the apps etc. but it’s promising.

But PLS be patient with me as absolute beginner who tries to learn

PLS Where to put What?

PLS next step
Hope for help!

just write this line : ’htaccess.IgnoreFrontController’ => false,

in your config.php (in config folder below your nextcloud installation) before the closing bracket (last line)

it will hides the index.php at generating. If the server isn’t set up properly you will get an error, but since there are rewrite rules allready there, just give it a shot.