Different domains - different language

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 3
Joined: 23 Sep 2014, 06:19

Different domains - different language

16 Feb 2016, 12:52

We use ISAPI_rewrite to generate our URL's.

At this moment our website uses 2 languages.

So our URL's look like this:

English:
http://www.companyname.nl/en/yachtbroke ... E-OFF.html

and

Dutch:
http://www.companyname.nl/nl/jachtmakel ... E-OFF.html

As you can see "en" and "nl" in the url determine the language to show.

This particular url is created by the following rule:

RewriteRule ^(\w+)/([^/]+)/(\d+)/([^/]+)\.html$ boat.asp?language=$1&page=${mapfile13:$2}&reference_no=$3&model=$4 [NC,L]


Now the question:

We want to register a new .de domainname. The .de domainname will point to the same website.

However, when someone visits the website by the .de domainname the url should show:

http://www.companyname.de/yachtmakler/351184/KOOPMANS-ONE-OFF.html

Is this possible?

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Different domains - different language

16 Feb 2016, 15:32

Hello.

Try to put this rule before the rule you've shown in question:


RewriteCond %{HTTP:Host} www\.companyname\.de [NC]
RewriteRule ^([^/]+/\d+/[^/]+\.html)$ nl/$1 [NC]

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 11 guests