I was wondering how I could hide filename completetely from url using .htaccess.
Currently it is like: mysite.com/foldername/filename
And I would like it to be like: mysite.com/foldername
At the moment I use .htacces file for removing only file extensios from url and I would like to upgrade it to only show folder name. We have not leader anything about .htacces yet so I would appreciate pretty direct codes and hints, thank you! :)
RewriteOptions inherit
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.htm -f
RewriteRule ^(.*)$ $1.htm
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "http\:\/\/tjmediaproductions\.com\/quiz\/" [R=301,L]