Mod Rewrite / Rewrite to Sub Directory
===

I've been trying to figure out mod_rewrite for days and I was wondering if you guys have any ideas

My primary domain is siteX.com, which maps to 'public_html' directory.

Recently, i added another domain, called siteY.com, and i marked 'public_html/siteY/public_html' as its root directory.

Now I'm trying to change my root directory for siteX, by mapping it to' public_html/siteX/public_html', but I when I implement mod_rewrite, it lets the users see the url to be 'http://www.siteX.com/siteX/public_html'. I need my primarly domain to map automatically to the correct directory with the using see only 'http://www.siteX.com'.

To better illustrate the directories im referring to.

    public_html (siteX, my primary domain marks this as root directory)
    	- .htaccess file
    	- siteX
    		-public_html (siteX i want my primarily domain to mark this as root directory)
    	- siteY
    		-public_html ( siteY.com marks this as root directory)

I hope i made the problem clear. Thank you.


This is currently the rewrite rule i am using:

    RewriteCond %{HTTP_HOST} ^(www.)?siteX.com [NC]
    RewriteRule ^$ http://www.siteX.com/siteX/public_html/index.php 

For my hosting company, I believe mod_rewrite is the only way to go

