Url friendly and Url default php with parameters

0

I have a question and I believe you can help me.

I want to let the two URL systems work on my site, I want to be friendly on some pages and leave the default form on another.

pagina.php?nome=Bruno

Would anyone know how to set .htacces s to accept both patterns?

I'm already hiding .php with this code

RewriteEngine on<br>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
    
asked by anonymous 19.02.2016 / 17:43

1 answer

0

You can use

  RewriteEngine On
  RewriteRule ^nome/([^/]*)$ /?nome=$1 [L]

This will return a page of this type

pagina.php/nome/Bruno

If you want to omit the / name / you can use

RewriteEngine On
RewriteRule ^([^/]*)$ /?nome=$1 [L]

I hope I have helped.

    
19.02.2016 / 18:48