apache - .htaccess redirect request from specific domain to another domain -


i have apache server hosting site. have 2 domains pointing server, www.mysite.se , www.mysite.com.

i'm trying figure out how in htaccess file redirect traffic coming www.mysite.se domain www.mysite.com/se/

i've tried several ways cannot work. end on root of site, in www.mysite.com instead of /se/ path.

this i've tried far:

rewriteengine on rewritecond %{http_host} ^www\.mysite\.se [nc] rewriterule ^(.*)$ http://www.mysite.com/se/ [r=301,nc]  rewriteengine on rewritecond %{http_host} ^(www.)?mysite.se$ [nc] rewriterule ^(.*)$ /se/$1  rewriteengine on rewritecond %{http_host} ^(www.)?mysite.se$ rewriterule ^(/)?$ se [l] 

what doing wrong?

this seems have done it!

rewriteengine on rewritecond %{http_host} ^(www.)?mysite.se$ rewriterule (.*)$ http://www.mysite.com/se/ [r=301,l] 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -