输入链接时重定向用户

I know there are other posts asking around the same question, but I cannot seem to make them work.

When a user types

http://mywebsite.com/msdns/[letters, numbers, and symbols here]

I need it to go to my page:

http://mywebsite.com/msdns/index.php?q=[letters, numbers, and symbols here]

What I have so far is this in my .htaccess file (located in the same folder as index.php):

RewriteEngine On
RewriteRule ^/(.*)/$ /index.php?q=$1

This however does not work. Any solutions?

Thank you in advance, pat

Place this rule in your /msdns/.htaccess:

RewriteEngine On
RewriteBase /msdns/

RewriteRule ^((?!index\.php).+)$ index.php?q=$1 [L,QSA]