apache - htaccess rewrite and redirect php extension -
this question has answer here:
- remove .php extension .htaccess 12 answers
how can rewrite & redirect from:
site.com/folder/login.php
site.com/folder/login/
site.com/folder/profile.php
site.com/folder/profile/
and want when go login.php, redirect /login/
i've heared htaccess, i'm newbie, can explain how this? in advance
p.s have site.com/folder/profile.php?logout=true
rewrite site.com/folder/profile/logout/
thank you.
hiding .php extension browser
to hide .php extension appearing should add inside .htaccess file!
rewriteengine on rewritecond %{request_filename} !-f rewriterule ^([^\.]+)$ $1.php [nc,l]
now, users can access page writing domain.com/profile
i hope helped you. luck!
Comments
Post a Comment