My site is www.mysite.com and I need the DocumentRoot to be /var/www/web1/web/catalog Then I need to have a subdomain acc.mysite.com with a DocumentRoot of /var/www/web1/web How can I accomplish this without a manual edit of the apache conf? Thanks
You could use a .htaccess file for this. Something line this should work. Code: RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} www\.mysite\.com RewriteRule (.*) http://www\.mysite\.com/catalog/index.html$1 [R=301,L] RewriteCond %{HTTP_HOST} acc\.mysite\.com RewriteRule (.*) http://acc\.mysite\.com/web/index.html$1 [R=301,L]
How do I get that to work with the the following already in the virtualhost config <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_URI} !^/oscatalog/.*$ RewriteCond %{REQUEST_URI} !^/oslanguages/.*$ RewriteCond %{REQUEST_URI} !^/osimages/.*$ RewriteCond %{REQUEST_URI} !^/uploads/.*$ RewriteCond %{REQUEST_URI} !^/fileopen\.php$ RewriteRule ^/(.*)$ /oscatalog/$1 [NC,L] </IfModule>