My current .htaccess file is as Options +FollowSymlinks RewriteEngine On RewriteRule ^(.+)\.html$ $1.php [L] This is at the directory level, I do not want to have a site-wide .htaccess. I can redirect ../file.html to ../file.php but I am not able to do it for ../file/ -> ../file.php What exactly I need to change on this code to be able to do that? I have found many tutorials but they almost always assume I am doing .htaccess at the root level, whereas I would like to do this for a single directory. Thanks in advance
Found a solution: Options +FollowSymlinks RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)/?$ $1.php [L]