Forum Moderators: phranque
RewriteCond $1 !^(index\.php¦robots\.txt¦sitemap\.xml¦labels\.rdf¦w3c/p3p\.xml¦google[0-9a-f]{16}¦y_key_[0-9a-f]{16}\.html¦LiveSearchSiteAuth\.xml)$
RewriteCond $1 !^account/
RewriteRule ^(.*)$ /index.php?username=$1 [L]
There are two solutions to avoid having to list *all* URL-paths that must be excluded. One is 'easy' but can be quite inefficient, because it requires two additional calls to the operating system to check for file and directory exists for every request recieved by your server, and this can slow down your server to the point where you will be forced to upgrade your hosting account sooner than normal if you have a successful/busy site:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?username=$1 [L]
RewriteRule ^users/(.*)$ /index.php?username=$1 [L]
RewriteRule ^member-(.*)$ /index.php?username=$1 [L]
Check out the resources cited in our Forum Charter and the example threads in our Forum Library. Links to both of these are at the top of this page.
Jim