This is driving me mad. I’m trying to use .htaccess to redirect a subfolder (that doesn’t exist) to the index page, using the subfolder name as the variable. ie:
redirects to:
http://www.website.com/index.php?name=john
I’ve tried this (and various others) with no luck:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)$ index.php?name=$1
Here is an example, how you can do this:
This one also denies access to folders you don’t want to have public.