Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a website with 2 languages.

website.local/fr and website.local/en

How can I redirect:

  • myfrweb.com to website.local/fr

and

  • myenweb.com to website.local/en

keeping the myenweb.com or myfrweb.com in the navigation url?

Because actually when I redirect myfrweb.com to website.local/fr, if I'm navigating to myfrweb.com, the url become website.local/fr.

share|improve this question
    
What do you want people to see when they go to website.local? –  paulmorriss Jan 6 '12 at 14:55
    
People never have to go to website.local/en or fr. The public url will be myenweb.com and myfrweb.com and in the navigation url the url must stay myenweb.com or myfrweb.com –  Tuizi Jan 6 '12 at 15:09
    
What exactly is website.local? Is that representing a "local" hostname that isn't accessible from WAN by DNS? If so, then you've got more than the appearance of the URL to worry about. If it represents a regular WAN-resolvable domain, then you should probably use a more conventional name. –  Lèse majesté Jan 6 '12 at 15:35
    
website.local is an example name but it represente the server name hosting the website. It can be an IP for example –  Tuizi Jan 6 '12 at 15:49

3 Answers 3

You can create two websites using IIS7 (I don't know the details as I only have IIS6) and point one at the directory with the files for /fr and one at the directory with the files for /en.

share|improve this answer
    
I don't have file for french en english, I'm playing with url rewriting and culture –  Tuizi Jan 6 '12 at 15:57

If there's an actual need to maintain the original website, you can use IIS's rewrite module to rewrite the URLs, or if they have to be hosted on separate servers, IIS's rewrite module can also be set up as a reverse proxy.

Though generally the simpler the setup the better. If you can use paulmorriss' solution and just set up the public domains with properly configured vhosts, then there'd be no need for any rewriting/redirecting/reverse-proxying/masking.

share|improve this answer
    
I can use the paulmorris's solution. But with url rewriting I can have a great solution but I've a problem... I'm searching... –  Tuizi Jan 6 '12 at 16:03

You can either do url rewriting, this will show the original url in the browser but the browser will fetch content from the new url. This can be done either in asp.net or using an ISAPI rewrite filter or proxy.

Or you can server transfer which will send content from another page (so they must be the same site) on the original request.

Or you can use an xmlhttp request to fetch the page from the 2nd server to the first and then pass it on to the user (which means that you can fetch info from a hidden or 3rd party server)

share|improve this answer
    
302 Found or 307 temporary? –  Tuizi Jan 6 '12 at 16:10
    
302 or 307 doesn't show the original url in the browser :( –  Tuizi Jan 6 '12 at 16:11
    
Yeah sorry, had half changed it to url rewriting but left that in in a hurry. –  JamesRyan Jan 6 '12 at 20:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.