# 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:** 2

<div class="post-metadata">

**Author:** ![clouduser](https://help.nextcloud.com/letter_avatar/clouduser/32/6_22734026db12803ebb3e059622ac3534.png) [@clouduser](https://help.nextcloud.com/u/clouduser)\
**Post date:** [May 24, 2017, 12:16pm UTC](https://help.nextcloud.com/t/removing-index-php-from-the-nextcloud-uri/13055/2 "2017-05-24T12:16:47Z")

</div>

This works on CentOS **7**!

Add this to your config.php

`'htaccess.RewriteBase' => '/'` (Path depends on your configuration - maybe `/nextcloud`)

Update htaccess with the occ command  
`sudo -u apache php occ maintenance:update:htaccess`

Make sure all modules are enabled with  
`cat /etc/httpd/conf.modules.d/* | grep mod_env`  
and  
`cat /etc/httpd/conf.modules.d/* | grep mod_rewrite`

The output line should not start with `#`

I also restarted my httpd  
`systemctl restart httpd`

---

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