473,795 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bilingual site with parked domain

Jacotheron
44 New Member
I have a problem again. I have a 2 sites for one of my customers. The site is English and Afrikaans. The English site is parked on the Afrikaans site.

The script should check to see if the page is accessed through the correct domain. If it is not accessed through the correct domain, it should redirect to the correct domain and create a cookie to always return to the correct domain.

Here is an example:

Someone enters the site through english.co.za but it shows the afrikaans.co.za 's home page (afrikaans.co.z a/index.html). The script should see that it is the wrong page and redirect to the page english.com/en/index.html. The cookie should remember where to go if the user enters the site again (english.co.za or afrikaans.co.za )

Can someone tell me how I am supposed to do this.
Feb 2 '08 #1
5 1651
acoder
16,027 Recognized Expert Moderator MVP
Why should it show the Afrikaans home page when accessing through the English domain?
Feb 2 '08 #2
Jacotheron
44 New Member
Why should it show the Afrikaans home page when accessing through the English domain?
The English domain is parked on the Afrikaans domain. Paked domain: "Parked Domain
A Parked domain refers to a domain name that points to the same website as the domain name on which it is 'parked'. For example, you can park 'domainname.co. za' on the domain name 'domainname.com '. If someone types the parked domain name 'domainname.co. za' into a web browser, it will point to the same website that 'domainname.com ' points to.

The web browser's address bar will display the parked domain name and will not display the domain name on which it is parked. A Parked domain name has the same IP address as the domain name on which it is parked."



The problem is that the main home page is Arikaans in stead of English, but my client do not want the main home page English. The cookie and javascript should redirect viewers to the page according to the addressbar.
Feb 4 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Thanks for the clarification. In your code, check the location.href. If it's the English domain, redirect by setting window.location .href to the new URL.

As for setting the cookies, I assume you know how to get/set cookies. First, check that the cookie exists. If it does, redirect. If it doesn't and it matches the English domain name, set the cookie and then redirect.
Feb 4 '08 #4
Jacotheron
44 New Member
Thanks for the clarification. In your code, check the location.href. If it's the English domain, redirect by setting window.location .href to the new URL.

As for setting the cookies, I assume you know how to get/set cookies. First, check that the cookie exists. If it does, redirect. If it doesn't and it matches the English domain name, set the cookie and then redirect.
Thank you, I will try this and I guess it should work.
I just do not quite know how to get/set cookies but will try to create the correct cookies with the programs I use.
Feb 5 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
I just do not quite know how to get/set cookies...
This link should help.
Feb 5 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

10
3263
by: Amittai Aviram | last post by:
This XHTML 1.0 Strict page -- http://www.studiolirico.org/docs/settimana2003.html has a bilingual title in Italian and English. The principle language of the page is Italian, so the <html> tag looks like this (w/o the space in the xmlns URL): <html xmlns="h ttp://www.w3.org/1999/xhtml" xml:lang="it" lang="it"> Within the body, I have English translations for all Italian text, and these are always contained within elements that bear the...
30
3526
by: Gustaf Liljegren | last post by:
I'm working with some semi-advanced tables with lots of decimal numbers in, and I can't get the alignment to work. http://www.algonet.se/~gustafl/temp/output_ib.html I want numbers aligned to the decimal point. The HTML 4 spec says User agents doesn't need to support 'char' and 'charoff', so I wonder if the problem is lack of support? If so, can the same results be achieved in another way?
2
1909
by: Tim | last post by:
I am doing a small asp webshop and want to make it atleast bi-lingual. I have thought of a few ways to do this but would like to have a second opinion on what you think is the best way. I have browsed the Google archives and seen this question pop up a few times before but never with any particulary good answers. For some reason this doesn't seem like a hot topic. I am not talking about the product information, that is already stored...
2
1353
by: Rog | last post by:
Hi, I have a bilingual report that should print amounts as 1,234.00 in the English(US) part --which is no problem-- and as 1.234,00 in the French part. My regional settings are US. How can I format the amounts in the European way? TIA, Rog
9
1760
by: dale zhang | last post by:
Hi, Anybody here has experience to build a english/chinese web? The chap 15 in Developing Web Applications tells sth about how to do this, but I want to know more details. It seems detect and redirect are the way for me to do this. Does this mean I have to have image button on the main page to link to chinese pages? all chinese pages will duplicate english ones? the following is from the book,
5
3309
by: will | last post by:
I have a php/mysql site and I am wondering if anyone has suggestions about strategies for making it bilingual or resources on how to do this. I thought of one way which would be to replace the text with calls to a database which has all the text in it. But I would prefer to have a single file with phrases and then just be able to translate that single file into another language to produce a site in another language. Any ideas would be...
1
2739
by: chewster | last post by:
Hi. I'm very new to the .htaccess and currently trying to figure this out. I'd like to redirect a parked domain to a sub domain or a folder without showing the actual address location. So far I'm only about to redirect and and it shows the exact location. Heres an example: http://www.parked-domain.com > http://sub-domain.main-domain.com or http://www.parked-domain.com > http://www.main-domain.com/folder have the address bar appear...
3
4471
by: jobs | last post by:
I have an English site I need to make available in Spanish. Ideally there will be a preset switch in the users profile to indicate they would like to see the site in Spanish. My first inclination is to make a copy of the site redirect them after the login. Outside of doing it this way, or purchasing/using third party products or controls that deal with localization and maybe use xml to drive those controls dynamically. Is their an...
3
2061
by: shubby | last post by:
Hello, I am running a website and have a domain on it, now can i purchase another domain on the same hosting plan, is this what we call parked domain, also please tell me that can we use that second domain as complete different website, and can we purchase that second domain from other company than the first one
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.