Creating URL Friendly I do not know how to do

0

I have a website and in index.php and where it is registered and logged in. Watch some video lessons but all of them make the explanation using the index as an example so you can get the url and work with php

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1

I have to remove all content from the index and put in a new file so that I can leave the index for url checks ????????

Another question is that if I do not want to do the above, I can choose to rewrite what the user types and where he goes only with htaccess? that's right? or has it any other way?

example:

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^login(.*)$ login.php
    
asked by anonymous 25.12.2017 / 20:49

1 answer

0

I did not understand your question very well, but.

1 - create an .htaccess file.

2 - Do not mecha in the index with htaccess since it is the main page.

3 - To modify the URLs do the following.

RewriteEngine On
RewriteBase /
RewriteRule ^Nome-da-pagina-que-vc-quer?$ Nome-da-pagina-que-vc-quer-mudar.php[QSA,L,NC]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
    
25.12.2017 / 21:00