• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

URL Redirect from one TLD to another

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am working on a website in struts. For URL redirection, httpredirectfilter java interface is used in thos website. All the redirections are working fine, except one for which I sought for your help.

Currently, we have 3 locales in my site that work on 2 Top Level Domains.

Locale Names
en_US ------ For US

en_CA ------ For Canada

fr_CA ------- For Canada

Top Level Domain (TLDs)



Currently all the locales work in conjunction with both the TLDs. This is affecting our GA tracking, so we decided to restrict Canada locales to .ca TLD and US locale to .com TLD. For this purpose, I made code modifications in two of the files, httpredirectfilter.xml & .htaccess. I tested these modifications in our local environment and they work good. However, when I push them to production site, these modifications are not reflected in the live site. Not able to understand the reason for this. Hosting company says there is no configuration on their end which stops redirection. So I seek to work with you to check if this is a permission issue. In case, if its something different from permission issue, please let me now on that.

I am using following code in httpredirectfilter.xml for redirection:
<redirect match="^www.mysite.com/en_CA/(.*)$" target="http://www.mysite.ca/en_CA/$1";
permanent="yes" enitre-url="yes />

I'll be grateful for any help provided
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't seem to be Struts-related; you might want to post in a different forum.
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic