# Removing index.php from the Nextcloud URI

**URL:** <https://help.nextcloud.com/t/removing-index-php-from-the-nextcloud-uri/13055>\
**Category:** ℹ️ Support\
**Created:** [May 24, 2017, 11:54am UTC](https://help.nextcloud.com/t/removing-index-php-from-the-nextcloud-uri/13055 "2017-05-24T11:54:02Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![drewjosh](https://help.nextcloud.com/user_avatar/help.nextcloud.com/drewjosh/32/30401_2.png) [@drewjosh](https://help.nextcloud.com/u/drewjosh)\
**Post date:** [February 26, 2021, 2:26pm UTC](https://help.nextcloud.com/t/removing-index-php-from-the-nextcloud-uri/13055/14 "2021-02-26T14:26:10Z")

</div>

@Tomvanwaas and @DadeMurphy

The solutions mentioned above can also be found in the nextcloud docs: [Proxy Configurations](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#proxy-configurations)

1. Add this line to [root folder of nextcloud]/config/config.php:

`'htaccess.RewriteBase' => '/',`

Advice on parameter:

> In a standard Apache setup this usually equals the folder that Nextcloud is accessible at. So if Nextcloud is accessible via “[https://mycloud.org/nextcloud”](https://mycloud.org/nextcloud%E2%80%9D) the correct value would most likely be “/nextcloud”. If Nextcloud is running under “[https://mycloud.org/”](https://mycloud.org/%E2%80%9D) then it would be “/”.

1. Login to your server via SSH and navigate to your nextcloud folder

2. Run the following command to update your .htaccess file:  
`occ maintenance:update:htaccess`  
(on my web hosting server I need to run it like this: php occ maintenance:update:htaccess)

You can update the .htcaccess file in nextcloud root folder manually but I only recommend that when you really know what you are doing.

If you don’t have access to your server via SSH, try [running occ commands via web interface](https://help.nextcloud.com/t/how-to-use-occ-commands-on-a-shared-hosting-without-ssh-access/46133).

Let me know if this was clear enough. Cheers 😁

---

_[View the full topic](https://help.nextcloud.com/t/removing-index-php-from-the-nextcloud-uri/13055)._
