.htaccess - Htaccess language redirect for joomla page -


i have website 6 languages - use /en , /de or /it language codes in url. want redirect 1 langauge (it) domain (external link - forward user italian website). think .htaccess right way this.

.htaccess still complex me.

user should redirected when trying access italian language on site, once accesses url has /it/ language tag.

can out .htaccess magic?

i tried modify following code found don't understand enough yet... doesn't work yet...

rewritecond %{http:accept-language} ^(it.*) [nc] rewritecond %{request_uri} !(^/it/.*) [nc] rewriterule ^(.*)$ /it/$1 [l,r=301]  rewritecond %{request_uri} !(^/.*) [nc] rewriterule ^(.*)$ /$1 [l,r=301] 

this can help:

rewriteengine on rewritebase / rewriterule ^it/(.*)$ http://another-domain.com/$1 [r=301,l] 

requested url: http://old-domain.com/it/hello

will redirect to: http://another-domain.com/hello


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -