apache - htaccess rewrite and redirect php extension -


this question has answer here:

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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -