How can hide file extension (index.php)

concrete 9.0 php 7.4
I´m new in the cms I need remove the extensions from urls
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.

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

1 Like

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

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

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.

@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…

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.

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
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

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