473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Bilingual site with parked domain

Jacotheron
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.za/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 1625
acoder
16,027 Expert Mod 8TB
Why should it show the Afrikaans home page when accessing through the English domain?
Feb 2 '08 #2
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 Expert Mod 8TB
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
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 Expert Mod 8TB
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
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...
30
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...
2
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...
2
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...
9
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...
5
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...
1
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...
3
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...
3
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.