.htaccess重写以保持子目录为网站的根目录

I have server that contains different folders for different websites:

-- root
    --- automation
    --- thecorporation
-- .htaccess

its URL looks like this:

http://example.com:3333

I need to rewite the URL so when the user visits one of the pages like: http://example.com:3333/automation the automation folder would become the root, because now if a menu is clicked to access: http://example.com:3333/automation/contact php looks for files on the server but these sites are single page websites:

File does not exist: /var/www/html/automation/contact, referer: http://example.com:3333/automation

I really suck at regex and htaccess I would really appreciate some help. What I have tried so far was, but it does not work:

Options +FollowSymLinks 
RewriteEngine On

RewriteRule ^automation/?$ /index.php [NC,L]