• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

URL Redirect from one TLD to another

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

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)

.com

.ca


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
 
Author
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
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic