I have a filesystem of PHP files and folder and want to make the URLs nicer but can't seem to find the right combo. This works to make the admin.php work as just admin but I can't find a good way to add the trailing slash and redirect it to the pretty URL if someone hits the PHP URL.
#Remove .php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [L]
Wanted:
domain/admin.php => domain/admin/
domain/admin => domain/admin/
Virtual and Real subfolders too?
domain/folder/ => loads index.php if exists otherwise loads folder.php in root
If anyone has any tips I'd appreciate it!
Thanks!