Here is my URL: http://localhost/school-project/project1/mypage.php/home
I wanna get rid of .php in mypage.php. So the new URL should look like this: http://localhost/school-project/project1/mypage/home
I have tried to use RewriteRule in .htaccess, but none of them worked!
Here is the code in my .htaccess:
(this one actually gets rid of the .php, but it turned the page to Object not found, error 404)
RewriteRule ^mypage.php/(.*)$ http://localhost/school-project/project1/mypage/$1[NC,L,R]
or
RewriteRule (.*)mypage/(.*)$ /mypage.php?/$1 [L]
I don't really know where the problem is. Any ideas? Thanks!