I have an issue with implementing a microsite within a joomla 1.5 CMS with it's own template and domainname.
Here is what I try to do:
I have a mainsite (http://www.mainsite.com) which is a joomla 1.5 running website.
I have a new domainname [
microsite.com...] for the implementation of a new subsite of the mainsite, but wnat to make it look independant from the mainsite.
The mainsite has already a rewrite, because the the site is installed in a subdirectory (called www) from the documentroot of the server (/public_html/www/...).
I've already set up the microsite succesfully and is now running by using [
mainsite.com...] But i want the new url to be displayed instead of the mainsite. So I tried several rewrites in the .htaccess file and redirects within cpanel ut none of the solutions worked out correctly.
So when entering the url [
microsite.com...] I want to display the contents of the url [
mainsite.com...] but still see the url [
microsite.com...]
Does anyone know how to get this working with rewriting the htaccess file?
The redirection of the subdirectory is done by the following code in the htaccess file in the documentroot (not in the joomla subdir):
########## Begin rewrite to subdir
RewriteCond %{HTTP_HOST} ^mainsite\.com$
RewriteRule (.*) http://www.mainsite.com/$1 [R=301,L]
# If you want an external redirect, set the R flag there as well:
RewriteRule ^$ /www [L,R=301]
#Match all www and do a permanent redirect from www.example.com to example.com
#RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]
#Ok, now get rid of that joomla directory in the resulting url.
RewriteCond %{REQUEST_URI} !^/www/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /www/$1 [L]
RewriteRule ^(/)?$ www/index.php [L]
########## End