localhost/ Funciona
localhost/practica3/ Funciona
localhost/prueba3/gato Funciona
localhost/gato Falla
/.htaccess
Código:
RewriteEngine On
RewriteRule ^$ /practica3/ [L]
/practica3/.htaccess
Código:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
/practica3/index.php
Código:
<?php if(isset($_GET['url'])) echo $_GET['url']; ?>