View Single Post
Old 10-26-2009, 07:20 AM  
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Well in htaccess this should work:
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com
RewriteRule (.*) http://www.mydomain.com/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !^/web
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-f
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-d
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-l
RewriteRule ^(.+) /web$1
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote