Ok heres what i need to do. I have a server which has 10 domains on it. I want each of the subdomains to have their own folder which has its own word press installed. so i think i need to set my main root .htaccess (which is shared by all the add on domains) to redirect users to the correct subfolder. When they arrive there they should still be on the domain they requested, and be presented with word press. Also the internal mod rewrites of word press should be working too. After googling for it i found RewriteCond %{HTTP_HOST} ^www\.abc\.com RewriteCond %{REQUEST_URI} !/abc/ RewriteRule (.*) /abc/$1 [L] Code (markup): this results in a 500 Internal Server Error
Which server are you using apache ? If yes you can try this .htaccess RewriteEngine On This activates Apache's URL rewriting engine. Follow this line with rulesets like the one below: RewriteCond %{HTTP_HOST} site1.com$ [NC] RewriteCond %{REQUEST_URI} !^/vhosts/site1/.*$ RewriteRule ^(.*)$ /vhosts/site1/$1 [L] RewriteCond %{HTTP_HOST} site2.com$ [NC] RewriteCond %{REQUEST_URI} !^/vhosts/site2/.*$ RewriteRule ^(.*)$ /vhosts/site2/$1 [L] site1.com will go to /vhosts/site1 ,etc
I still get a server 500 internal error. Maybe my server disallows doing this. I've got a pretty full cpanel not sure if i can do anything in there.
Address is china-medical-insurance dot com the folder is the same, basically its at health-insurance-overseas dot com / china-medical-insurance log info, these are two errors, one (the latter) is from the code i tried at first and is in my first post, the other is from the code you posted. [Thu Dec 14 00:40:14 2006] [alert] [client 58.33.145.215] /home/healthi1/public_html/.htaccess: Invalid command '\xef\xbb\xbfRewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration [Thu Dec 14 00:13:42 2006] [alert] [client 58.33.145.215] /home/healthi1/public_html/.htaccess: Invalid command '\xef\xbb\xbfRewriteCond', perhaps mis-spelled or defined by a module not included in the server configuration
Rewrite*** commands are not interpreted at all, is their extra space/tab in your .htaccess files? what is the permission for .htaccess ? I think you need to ask for support from your hosting provider
try this in your htaccess file .htaccess RewriteEngine On This activates Apache's URL rewriting engine. Follow this line with rulesets like the one below:
ok still getting a 500 internal error. the exact code i'm using in the .htaccess is below .htaccess RewriteEngine On RewriteCond %{HTTP_HOST} china-medical-insurance.com$ [NC] RewriteCond %{REQUEST_URI} !^/china-medical-insurance/.*$ RewriteRule ^(.*)$ /china-medical-insurance/$1 [L] Code (markup):
Ok that doesn't seem to be working, how about this. Can I use mod rewrite to chop off a subfolder? So the blog would actually be located at http://www.china-medical-insurance.com/china-medical-insurance/ however the rewrite would change that to be http://www.china-medical-insurance.com
Is that really the exact code : RewriteEngine On RewriteCond %{HTTP_HOST} china-medical-insurance.com$ [NC] RewriteCond %{REQUEST_URI} !^/china-medical-insurance/.*$ RewriteRule ^(.*)$ /china-medical-insurance/$1 [L] Code (markup): remove ".htaccess" from it ......