If I have a url http://example.com/page.php
but I want the page to display when someone goes to http://example.com/page/
how do I go about doing that?
If I have a url http://example.com/page.php
but I want the page to display when someone goes to http://example.com/page/
how do I go about doing that?
I usually use something like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule .* - [L]
RewriteRule ^$ index.php [L,QSA]
RewriteRule ^([^/\.]+)/?$ $1.php [L,QSA]
</IfModule>
Note the question mark after the slash. You could add that to Gumbo's example to "test" for a trailing slash (so it can be there or not).