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

Asked

Viewed 417 times

1

I have the URL with the following pattern:

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

I tried to change from index.php to nothing, that way:

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

Because she hasn’t changed?

1 answer

0

Hello, try to test this code:

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

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

If it doesn’t work, it means that you are not allowed to edit htaccess. Ai have to contact the website domain or enter cPanel.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.