Rewriting URL

Andy To

I have installed Xenforo into a subdirectory (community) and normally the URL will appears to be I have use a .htaccess to rewrite the URL to, so that any site will be without the community. Everything works fine except for accessing the ACP. Did I miss something in the .htaccess file?

The ACP shows "This action could not be completed because you are no longer logged in." when trying to login.

RewriteEngine on

RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteCond %{REQUEST_URI} !^/community/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /community/$1

RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteRule ^(/)?$ community/index.php [L]