hello..

i have to write htaccess for mysite. actually we have two domains. '.com and .in' . for example i opened '.com' site it will actomatically access files from '.in' domain. there is no files in .com site. how to write .htaccess for this.

thanks.

Recommended Answers

All 4 Replies

Redirecting everything from .com to .in

RewriteCond %{http_host} domain.com [nc,or]
RewriteCond %{http_host} www.domain.com [nc]
RewriteRule ^(.*)$  [r=301,nc]

Redirecting everything from .com to .in

RewriteCond %{http_host} domain.com [nc,or]
RewriteCond %{http_host} www.domain.com [nc]
RewriteRule ^(.*)$  [r=301,nc]

i have a small doubt. for example i am opening www.test.com/usa. automatically it access files from . but i have to display url same www.test.com/usa. only iam accessing files from '.in'. display url will same

I think you need to remove the R flag.

exactly what i am trying see this second box 'MAKE A SITE NAME DISAPPEAR' how to do this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.