insp3kt0r
asked on
How to use .htaccess and mod_rewrite in 1 host-3 domain environment?
I have one hosting account and three domains.
What's the best way to write rules to .htaccess in following situation:
- one account, three domains (domain.cn, domain.fi, domain.com)
- need to redirect these to three subdirs (CN, FI, EN) SO that full path is visible in browser
* (www.)domain.cn redirects /CN/ and shows as http://www.domain.cn/CN/
* (www.)domain.fi redirects /FI/ and shows as http://www.domain.fi/FI/
* (www.)domain.com redirects /COM/ and shows as http://www.domain.com/EN/
I do have a fully working and smooth rules currently which in fact hides those subdirs from browser's address field. However, I want/need them to be visible.
I guess answer is simple, however I'm missing something and can't get it to function like described above.
What's the best way to write rules to .htaccess in following situation:
- one account, three domains (domain.cn, domain.fi, domain.com)
- need to redirect these to three subdirs (CN, FI, EN) SO that full path is visible in browser
* (www.)domain.cn redirects /CN/ and shows as http://www.domain.cn/CN/
* (www.)domain.fi redirects /FI/ and shows as http://www.domain.fi/FI/
* (www.)domain.com redirects /COM/ and shows as http://www.domain.com/EN/
I do have a fully working and smooth rules currently which in fact hides those subdirs from browser's address field. However, I want/need them to be visible.
I guess answer is simple, however I'm missing something and can't get it to function like described above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.