enlace de mi sitio web: https://example.com/about.php
Necesidad de cambiar el enlace: https://example.com/about
Intenté debajo del código:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^about/?$ about.php [L,QSA] </IfModule>Pero no funciona... Alguien por favor ayuda, gracias de antemano...
Prueba este código. Esto está funcionando en mi extremo.
RewriteEngine On RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]y asegúrese de haber habilitado rewrite_module.
Prueba esto:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]