Quiero tu ayuda. Tengo esta URL: wwww.myurl.com/?verfy=CDPOR888 O wwww.myurl.com/index.php?verfy=CDPOR888
Me gustaría ser así: wwww.myurl.com/CDPOR888
Por favor ayuda, ¿cómo puedo hacerlo con .htaccess?
Probé este código en .htaccess pero no funcionó:
RewriteRule ^([^/]*)\.php$ /?perms_verify=$1 [QSA,L,NC]pero el problema es .php, cuando lo elimino aparece un error.
NOTA: .htaccess sin distinción entre mayúsculas y minúsculas
Puedes usar esta regla:
RewriteEngine On # request is not for a file RewriteCond %{REQUEST_FILENAME} !-f # request is not for a directory RewriteCond %{REQUEST_FILENAME} !-d # rewrite to destination path RewriteRule ^([\w-]+)/?$ ?verfy=$1 [QSA,L]¡Reemplace esta regla!
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f # Use this rule RewriteRule ^([^\.]+)$ $1.php [NC,L]Actualice su archivo .htaccess como
DirectoryIndex index.php # remove the next 3 lines if you see a 500 server error FileETag none ServerSignature Off Options All -Indexes <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^([0-9a-zA-Z_-]{1,16})$ index.php?verify=$1 [L] </IfModule>En la página wwww.myurl.com/index.php, escriba la lógica para capturar el valor de verificación usando el método GET y realice sus operaciones adicionales