How to modify the URL of www.meusite.com/index.php?secao=quemsomos to www.meusite.com/quemsomos?

2

My .htaccess file looks like this:

RewriteEngine ON

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?secao=$1

I want to translate to url www.meusite.com/index.php?secao=quemsomos to www.meusite.com/quemsomos

Is it correct the way I put it? Because it is not working.

    
asked by anonymous 07.11.2017 / 11:51

1 answer

0

The rule works correctly, but these two conditions:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

means that the file ( -f ) does not exist and that the folder ( -d ) does not exist, and must be fulfilled to perform the rewrite.

You probably have a folder called /quemsomos , so the rewrite does not apply.

Remove or rename this folder or remove it.

    
22.11.2017 / 02:17