Hello,
I have three domain names and one webhosting.
Maindomain.com
Domainalias.com & domainalias2.com(not working with this now but require for future updates.)
I have added www.domainalias.com and domainalias.com in domain alias of maindomain.com
I have set proper DNS in domainalias.com also.
I am using following code in .htaccess of maindomain.com.
#code Begin
#http://forum.modrewrite.com/viewtopic.php?=&p=10265
Options +FollowSymLinks
RewriteEngine On
# to stop mod_dir redirecting to the maindomain.com URL
# when you miss a trailing slash, add the missing slashes
RewriteCond %{DOCUMENT_ROOT}/domainalias%{REQUEST_URI}/ -d [OR]
RewriteCond %{DOCUMENT_ROOT}/domainalias2%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
# as long as it's not a sub request (to stop loops)
RewriteCond %{ENV:REDIRECT_STATUS} ^$
# match the domain name
RewriteCond %{HTTP_HOST} ^(www\.)?(domainalias|domainalias2)\.com$ [NC]
# add it as the first directory and rewrite
RewriteRule ^(.*)$ /%2/$1 [QSA,L]
#code ends
I am getting following problem
1) When I open www.domainalias.com and click on homepage link in it. It shows url like http://www.domainalias.com/domainalias/index.php
How should I remove http://www.domainalias.com/domainalias/ & use only http://www.domainalias.com/
Can anyone help me to overcome situation.
Thanks
Prashant Jangam