Forum Moderators: phranque
I'm sure you've all seen sites with URLs like: http://www.example.com/some_page.php/category1/page2
I was wondering if it was possible to have it but without the .php extension. I already have functions in my .htaccess file to hide .php extensions. It works perfectly everywhere, except when there is a trailing slash after it. How can I make it work?
Please help, I've tried searching on this forum and googling like mad for several days and I came up with nothing. Thanks again!
[edited by: encyclo at 1:08 am (utc) on May 15, 2008]
[edit reason] switched to example.com [/edit]
## Enable mod_rewrite, start rewrite engine
RewriteEngine on
RewriteBase /## Converts test.php to test
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^/]+)/?$ $1.php [L]
Any small changes I need to make to this code to make it work for both www.example.com/mypage.php/1/2/3 and www.example.com/mypage/1/2/3? I appreciate any help, thanks!