I've recently made a new site on wordpress, the bulk of the site content is user profiles. I've added the following mod_rewrite rule so a user profile can be found at www.mysite.com/username

The code:

# BEGIN WordPress
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule ^([^/.]+)$ /index.php?profile=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress


Everything works perfectly on the surface, except the profiles aren't being indexed by search engines, so I checked the header response on an individual profile page and its saying HTTP/1.1 404 NOT FOUND.

Now I haven't technically got the individual profiles registered through the wordpress system as a post or page. I've just added a new custom table to the existing database and am querying the db directly. Could this be the issue, cause when I enable the wordpress 404 page and I go to www.mysite.com/username it will 404 instead of going to index.php

I'm not really sure where to start with this issue, if anyone could point me in the right direction I'd appreciate it!

Thanks
Frank