How to change the URL of site.com.br/index.php to site.com.br/ through .htaccess?

1

I have the URL with the following pattern:

  

https://dominio.com.br/index.php

I tried changing from index.php to anything like this:

  

https://dominio.com.br/

With the following rule:

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^\/?$ index.php [NC,L]
# Outras Rules

Why did not she change?

    
asked by anonymous 18.10.2017 / 19:04

1 answer

0

Hello, try testing this code:

RewriteCond %{THE_REQUEST} ^.*/index\.php

RewriteRule ^(.*)index.php$ /$1 [R=301,L]

If it does not work, you do not have permission to edit htaccess. Ai has to contact the domain of the site or enter cPanel.

    
18.10.2017 / 19:29