# How can hide file extension (index.php)

**URL:** <https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802>\
**Category:** Using Concrete / Help\
**Created:** [June 24, 2023, 7:32pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802 "2023-06-24T19:32:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![acorus](https://forums.concretecms.org/user_avatar/forums.concretecms.org/acorus/32/3495_2.png) [@acorus](https://forums.concretecms.org/u/acorus)\
**Post date:** [June 24, 2023, 7:32pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/1 "2023-06-24T19:32:06Z")

</div>

concrete 9.0 php 7.4  
I´m new in the cms I need remove the extensions from urls  
Sample  
[http://domain.com/index.php/about/services](http://domain.com/index.php/about/services)  
How can hide /index.php/ in url ? I can ad .httaccess via ftp or the cms have possible manage httacess file from inside. Thanks for help I try see something in forum and documentation but don´t find.  
I´m creating new website and need keep the same previous urls to receive existing external links.

---

<div class="post-metadata">

**Author:** ![enlil](https://forums.concretecms.org/user_avatar/forums.concretecms.org/enlil/32/3526_2.png) [@enlil](https://forums.concretecms.org/u/enlil)\
**Post date:** [June 24, 2023, 7:49pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/2 "2023-06-24T19:49:56Z")

</div>

Start by turning on pretty urls at /dashboard/system/seo/urls

---

<div class="post-metadata">

**Author:** ![acorus](https://forums.concretecms.org/user_avatar/forums.concretecms.org/acorus/32/3495_2.png) [@acorus](https://forums.concretecms.org/u/acorus)\
**Post date:** [December 25, 2023, 5:41pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/3 "2023-12-25T17:41:25Z")

</div>

If I check enable the box Remove index.php from URLs in dashboard/system/seo/urls I receive alert due the security reasons can´t write the php file in my server and apply changes. Is also possible do that with the htacees file? Thank you

---

<div class="post-metadata">

**Author:** ![enlil](https://forums.concretecms.org/user_avatar/forums.concretecms.org/enlil/32/3526_2.png) [@enlil](https://forums.concretecms.org/u/enlil)\
**Post date:** [December 25, 2023, 7:43pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/4 "2023-12-25T19:43:40Z")

</div>

yes, you most likely need to copy the snippet provided into your .htaccess file

---

<div class="post-metadata">

**Author:** ![acorus](https://forums.concretecms.org/user_avatar/forums.concretecms.org/acorus/32/3495_2.png) [@acorus](https://forums.concretecms.org/u/acorus)\
**Post date:** [December 25, 2023, 10:52pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/5 "2023-12-25T22:52:04Z")

</div>

Thank you for your quick help.  
Let me know what or where is the snippetI need to copy into my .htaccess file,  
Thank you for clarifying.

---

<div class="post-metadata">

**Author:** ![enlil](https://forums.concretecms.org/user_avatar/forums.concretecms.org/enlil/32/3526_2.png) [@enlil](https://forums.concretecms.org/u/enlil)\
**Post date:** [December 26, 2023, 2:34am UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/6 "2023-12-26T02:34:10Z")

</div>

@acorus When you check to remove index.php and save, you’re provided the bit to copy/paste. If you go back to /dashboard/system/seo/urls and click save again, you should see it. See attached…

 ![prettyurls](https://forums.concretecms.org/uploads/default/original/2X/a/aadd32f50ef3016692d408a63f5b9d63d973f9e5.png)

---

<div class="post-metadata">

**Author:** ![acorus](https://forums.concretecms.org/user_avatar/forums.concretecms.org/acorus/32/3495_2.png) [@acorus](https://forums.concretecms.org/u/acorus)\
**Post date:** [December 26, 2023, 6:41pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/7 "2023-12-26T18:41:51Z")

</div>

Thank you again. I tried to repeat the situation as you say but I couldn’t get this code from the clipboard. The new page gives an error and I save it again and it gives a new error. I had already seen this code and I´ve copied it carefully to upload it via ftp. I looked on the remote server and didn’t find any .htaccess file in the concrete directory to use. I wrote the code in a new htaccess file that I placed in the concrete folder. Did not work. The site is being tested and is located in a secondary directory to carry out effective testing. I wrote the code in the .htaccess file that I have at the root of the domain and it still doesn’t work. This is always done by clearing the browser cache between changes. I don’t know what options I have left, it’s strange that it doesn’t work. The version of PHP I have on the server is 7.4, I tried the latest versions of 8.1 and 8.2 of PHP and it still doesn’t work.

---

<div class="post-metadata">

**Author:** ![acorus](https://forums.concretecms.org/user_avatar/forums.concretecms.org/acorus/32/3495_2.png) [@acorus](https://forums.concretecms.org/u/acorus)\
**Post date:** [December 26, 2023, 6:52pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/8 "2023-12-26T18:52:50Z")

</div>

I`ve also used a variation of code without results  
  
RewriteRule .\* - [E=HTTP\_AUTHORIZATION:%{HTTP:Authorization}]  
RewriteBase /  
RewriteRule ^index.php$ - [L]  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteRule . /index.php [L]  
  
The error:  
Whoops \ Exception \ ErrorException (E\_WARNING)  
phpinfo() has been disabled for security reasons  
Update:  
Finally I managed to delete index.php but all the pages are giving the 404 error. Efectively the pages don’t exist without php  
The program also stuck in the dashboard / sitemap, which cannot be accessed. I can´t use like that

---

<div class="post-metadata">

**Author:** ![enlil](https://forums.concretecms.org/user_avatar/forums.concretecms.org/enlil/32/3526_2.png) [@enlil](https://forums.concretecms.org/u/enlil)\
**Post date:** [December 26, 2023, 8:59pm UTC](https://forums.concretecms.org/t/how-can-hide-file-extension-index-php/5802/9 "2023-12-26T20:59:30Z")

</div>

The .htaccess you’re looking for should be in your root folder, NOT the concrete folder…
