If I don't enable extension less urls (and umbracoUseDirectoryUrls=false), how do I configure this to make sure I can use dictionary items on the 'Other content pages' (so I have to set a culture using manage hostnames, can't just use http://site for all top level nodes nl-BE and nl-FR) and http://site/nl-BE can be used to browse home page for nl-BE?
I know that when using extension less url's and umbracoUseDirectoryUrls=true, I can use http://site/nl-BE and still assign hostname http://site/nl-BE to nl-BE node to be able to set culture and use dictionary items, but would like to know how to configure if not using the latter.
I've used subdomains for this. So I've assigned a default domain to the top root (dutch)
www.somesite.nl then for the english site I've created a subdomain and assigned that subdomain to the root node for the english site
english.somesite.nl
If all languages have the same domain, then you can just assign bogus domains on your top level nodes to set the language. The bogus domain won't show up in the NiceUrl unless you specify it in umbracoSettings
If I follow correctly, then yes you can use dictionary items in exactly the same way whether or not extensionless URLs are being used. If you check out www.pindar.com, you'll see pindar.com/fr.aspx, pindar.com/en.aspx etc etc. This has been using dictionary items in the standard way despite not using directory urls.
Basically, I want http://site/nl-BE as starting point for the BE site and http://site/nl-FR for the French version... but publishing will create a /nl-BE.aspx page instead of /nl-BE
Does this make more sense? Do you think a url rewrite would be more appropriate (only for those top level nodes)?
Let me know your thoughts.
[quote=mortenbock]If all languages have the same domain, then you can just assign bogus domains on your top level nodes to set the language. The bogus domain won't show up in the NiceUrl unless you specify it in umbracoSettings[/quote]
I wasn't really aware of the bogus blabla, I'll have a play with that.
@rsoeteman: I guess you mean more or less the same as Morten's statement here.
I just tried this. If you set the IIS to send all urls through the aspnet_isapi, then Umbraco will skow the page with or without the .aspx extension. The only thing the umbracoUseDirectoryUrls=true setting affects, is the way NiceUrl works. So as long as the url is passed to the .Net framework then http://site/nl-BE
and http://site/nl-BE.aspx
will return the same page. No need for a rewrite or anything.
you should also be able to assign the domain without domain.com (IE: /nl-BE)
as morten points out, make sure your settings are set for the two keys he mentions.
in either case, the root will load up the first node in the tree (nl-BE) You can redirect this to the home page of choice or have a language selection node at the top of the tree that asks the user to choose a language or a control that uses browser language settings to do it automatically. I had written a couple different controls to do this in the past. Email me at casey at neehouse dot com if you want the simple control.
On the language nodes, add a property called umbracoRedirect (visible redirection - think page.redirect) or umbracoInternalRedirectId (transparent redirect - think server.transfer) (note: I think the last d is lower (Id), but it may need to be upper (ID).) This property should be a content picker, and should be pointed at the language's home page.
[quote=mortenbock]I just tried this. If you set the IIS to send all urls through the aspnet_isapi, then Umbraco will skow the page with or without the .aspx extension. The only thing the umbracoUseDirectoryUrls=true setting affects, is the way NiceUrl works. So as long as the url is passed to the .Net framework then http://site/nl-BE
and http://site/nl-BE.aspx
will return the same page. No need for a rewrite or anything.
You could of course make a 301 redirect from http://site/nl-BE.aspx to http://site/nl-BE if you never want the .aspx extension shown for the front pages. [/quote]
Fhheeeuuuww, lots of new info and not my cup of tea. Mind sharing how to setup iis so umbraco will serve page with and without extension? And how to configure the 301 redirect (I'm a real noob on this subject)
you should also be able to assign the domain without domain.com (IE: /nl-BE)
as morten points out, make sure your settings are set for the two keys he mentions.
in either case, the root will load up the first node in the tree (nl-BE) You can redirect this to the home page of choice or have a language selection node at the top of the tree that asks the user to choose a language or a control that uses browser language settings to do it automatically. I had written a couple different controls to do this in the past. Email me at casey at neehouse dot com if you want the simple control.
On the language nodes, add a property called umbracoRedirect (visible redirection - think page.redirect) or umbracoInternalRedirectId (transparent redirect - think server.transfer) (note: I think the last d is lower (Id), but it may need to be upper (ID).) This property should be a content picker, and should be pointed at the language's home page.
[/quote]
I might give this approach a try as well, knew about the redirect settings but it would be great to try out your redirect controls as well. I'll send a mail!
Im currently sitting at a danish machine, so this guide is loosely translated :-)
1. Find your site in the IIS and select "properties"
2. Select the "Home directory" tab
3. Click the "Configuration" button.
4. Click "Add"
5. In "Executable" enter "c:\windows\microsoft.net\framework\v2.0.50727\aspnetisapi.dll"
6. "Extension type" type ".*"
7. Under "Verbs" select radio button "Limited to" and type "GET,HEAD,POST,DEBUG"
8. Check the "Script program" box
9. Make sure the "Check that file exists" box is UNchecked
10. click ok (sometimes the Executable path is truncated to "c:\windows\mi...\aspnetisapi.dll" which generates an error. Place the cursor in the path box, and click OK)
Now just add some if statements to check if the current url should be redirected. Should probably be made more generic so it can be reused by all languages.
I use another aproach for handling .* by IIS.
That is by using a simple IIS isapi filter (one dll that is registered in IIS). There is a simple tool called ISAPIRewrite Lite from Helicon. (The lite version is enough for this... and freeware).
What is does is making URL rewrite possible at IIS level, before anything is passed to .NET
Obviously you do want to handle URL rewriting by Umbraco, so the only thing I use it for is to add .aspx behind every request if that request does not have an extension.
You need to install it (it is a very light install) and it will register a ISAPI filter on your IIS. Then change the config file in the directory:
C:\Program Files\Helicon\ISAPIRewrite\hhtpd.ini
add the following line:
allow URLs without extension to be ended with .aspx
RewriteRule ^/([^.\?]+)/?(\?.*)?$ /$1.aspx$2 [L]
Now on the URL on the browser it is just possible to skip .aspx extension, but it is still possible to use querystring parameters.
Advice requested on multilingual site implementation
Hi guys,
Here's what I always seem to struggle with:
Content tree
-Content
--nl-BE
---Other content pages
--nl-FR
---Other content pages
If I don't enable extension less urls (and umbracoUseDirectoryUrls=false), how do I configure this to make sure I can use dictionary items on the 'Other content pages' (so I have to set a culture using manage hostnames, can't just use http://site for all top level nodes nl-BE and nl-FR) and http://site/nl-BE can be used to browse home page for nl-BE?
In current config, nl-BE page will be published as http://site/nl-BE.aspx?
I know that when using extension less url's and umbracoUseDirectoryUrls=true, I can use http://site/nl-BE and still assign hostname http://site/nl-BE to nl-BE node to be able to set culture and use dictionary items, but would like to know how to configure if not using the latter.
If question is not clear enough, let me know...
Looking forward to answers.
Cheers,
/Dirk
Hey Dirk.
I am not sure I entirely follow you, what are you trying to achieve exactly?!?
Warren :)
Hi Dirk,
I've used subdomains for this. So I've assigned a default domain to the top root (dutch)
www.somesite.nl then for the english site I've created a subdomain and assigned that subdomain to the root node for the english site
english.somesite.nl
Content
--nl (www.somesite.nl)
--Pages
-en (english.somesite.nl)
--pages
Hope it helps you,
Richard
Like Warren I'm not sure what the end goal is?
Do you want to use the top level node in your url's? For example:
http://site/nl-BE/SomePage/SomeSubPage.aspx
If all languages have the same domain, then you can just assign bogus domains on your top level nodes to set the language. The bogus domain won't show up in the NiceUrl unless you specify it in umbracoSettings
Just to extend my post with a sample:
Content
-nl-BE (Domain:horse, Lang: nl-BE)
--MyBEPage
--CommonPage
-nl-FR (Domain:dog, Lang: nl-FR)
--MyFRPage
--CommonPage
Now you set in the web.config
Make sure that the umbracoSettings.config has
Now your site would be able to get the correct culture using url's like:
http://site/nl-BE/MyBEPage.aspx
http://site/nl-BE/CommonPage.aspx
http://site/nl-FR/MyFRPage.aspx
http://site/nl-FR/CommonPage.aspx
Hi Dirk
If I follow correctly, then yes you can use dictionary items in exactly the same way whether or not extensionless URLs are being used. If you check out www.pindar.com, you'll see pindar.com/fr.aspx, pindar.com/en.aspx etc etc. This has been using dictionary items in the standard way despite not using directory urls.
Hope this helps,
Dan
Ok,
Let's make it more clear :p
Basically, I want http://site/nl-BE as starting point for the BE site and http://site/nl-FR for the French version... but publishing will create a /nl-BE.aspx page instead of /nl-BE
All other pages will be accessible through http://site/nl-BE/folder/subfolder/page.aspx which is fine, I just want to use http://site/nl-BE as the starting page instead of http://site/nl-BE.aspx (Although the latter will also be available)
Does this make more sense? Do you think a url rewrite would be more appropriate (only for those top level nodes)?
Let me know your thoughts.
[quote=mortenbock]If all languages have the same domain, then you can just assign bogus domains on your top level nodes to set the language. The bogus domain won't show up in the NiceUrl unless you specify it in umbracoSettings[/quote]
I wasn't really aware of the bogus blabla, I'll have a play with that.
@rsoeteman: I guess you mean more or less the same as Morten's statement here.
Again, thanks for the feedback.
I just tried this. If you set the IIS to send all urls through the aspnet_isapi, then Umbraco will skow the page with or without the .aspx extension. The only thing the umbracoUseDirectoryUrls=true setting affects, is the way NiceUrl works. So as long as the url is passed to the .Net framework then
http://site/nl-BE
and
http://site/nl-BE.aspx
will return the same page. No need for a rewrite or anything.
You could of course make a 301 redirect from http://site/nl-BE.aspx to http://site/nl-BE if you never want the .aspx extension shown for the front pages.
Hi Dirk,
I believe you should be able to do this still (it worked in v3, have not tried v4 yet):
nl-BE -> assign domain.com/nl-BE
nl-FR -> assign domain.com/nl-FR
you should also be able to assign the domain without domain.com (IE: /nl-BE)
as morten points out, make sure your settings are set for the two keys he mentions.
in either case, the root will load up the first node in the tree (nl-BE) You can redirect this to the home page of choice or have a language selection node at the top of the tree that asks the user to choose a language or a control that uses browser language settings to do it automatically. I had written a couple different controls to do this in the past. Email me at casey at neehouse dot com if you want the simple control.
On the language nodes, add a property called umbracoRedirect (visible redirection - think page.redirect) or umbracoInternalRedirectId (transparent redirect - think server.transfer) (note: I think the last d is lower (Id), but it may need to be upper (ID).) This property should be a content picker, and should be pointed at the language's home page.
[quote=mortenbock]I just tried this. If you set the IIS to send all urls through the aspnet_isapi, then Umbraco will skow the page with or without the .aspx extension. The only thing the umbracoUseDirectoryUrls=true setting affects, is the way NiceUrl works. So as long as the url is passed to the .Net framework then
http://site/nl-BE
and
http://site/nl-BE.aspx
will return the same page. No need for a rewrite or anything.
You could of course make a 301 redirect from http://site/nl-BE.aspx to http://site/nl-BE if you never want the .aspx extension shown for the front pages. [/quote]
Fhheeeuuuww, lots of new info and not my cup of tea. Mind sharing how to setup iis so umbraco will serve page with and without extension? And how to configure the 301 redirect (I'm a real noob on this subject)
TIA,
Dirk
[quote=neehouse]Hi Dirk,
I believe you should be able to do this still (it worked in v3, have not tried v4 yet):
nl-BE -> assign domain.com/nl-BE
nl-FR -> assign domain.com/nl-FR
you should also be able to assign the domain without domain.com (IE: /nl-BE)
as morten points out, make sure your settings are set for the two keys he mentions.
in either case, the root will load up the first node in the tree (nl-BE) You can redirect this to the home page of choice or have a language selection node at the top of the tree that asks the user to choose a language or a control that uses browser language settings to do it automatically. I had written a couple different controls to do this in the past. Email me at casey at neehouse dot com if you want the simple control.
On the language nodes, add a property called umbracoRedirect (visible redirection - think page.redirect) or umbracoInternalRedirectId (transparent redirect - think server.transfer) (note: I think the last d is lower (Id), but it may need to be upper (ID).) This property should be a content picker, and should be pointed at the language's home page.
[/quote]
I might give this approach a try as well, knew about the redirect settings but it would be great to try out your redirect controls as well. I'll send a mail!
TIA,
/Dirk
Great Discussion, good to see more approuches to MultiLingual.
@Morten Thanks for new insights. I think I will review the current setup of my customer.
Cheers,
Richard
Im currently sitting at a danish machine, so this guide is loosely translated :-)
1. Find your site in the IIS and select "properties"
2. Select the "Home directory" tab
3. Click the "Configuration" button.
4. Click "Add"
5. In "Executable" enter "c:\windows\microsoft.net\framework\v2.0.50727\aspnetisapi.dll"
6. "Extension type" type ".*"
7. Under "Verbs" select radio button "Limited to" and type "GET,HEAD,POST,DEBUG"
8. Check the "Script program" box
9. Make sure the "Check that file exists" box is UNchecked
10. click ok (sometimes the Executable path is truncated to "c:\windows\mi...\aspnetisapi.dll" which generates an error. Place the cursor in the path box, and click OK)
Now all urls should go to the aspnet isapi.
As for the redirect, the basis is this:
<script runat="server"><br /> private void Page_Load(object sender, System.EventArgs e)<br /> {<br /> //add logic if(current url is <a href="http://site/nl-BE.aspx">http://site/nl-BE.aspx</a>)<br /> Response.Status = "301 Moved Permanently";<br /> Response.AddHeader("Location","http://site/nl-BE");<br /> }<br /> </script>Now just add some if statements to check if the current url should be redirected. Should probably be made more generic so it can be reused by all languages.
Hi Morten,
I assume that you use IIS6 on that box? IIs7 is a bit more harder to configure :-( More info on
http://ruslany.net/2008/09/wildcard-script-mapping-and-iis-7-integrated-pipeline/
Cheers,
Richard
Yes Richard. That is correct. Actually I think it's IIS 5.2 (on my XP box)
Hello All,
I use another aproach for handling .* by IIS.
That is by using a simple IIS isapi filter (one dll that is registered in IIS). There is a simple tool called ISAPIRewrite Lite from Helicon. (The lite version is enough for this... and freeware).
What is does is making URL rewrite possible at IIS level, before anything is passed to .NET
Obviously you do want to handle URL rewriting by Umbraco, so the only thing I use it for is to add .aspx behind every request if that request does not have an extension.
You need to install it (it is a very light install) and it will register a ISAPI filter on your IIS. Then change the config file in the directory:
C:\Program Files\Helicon\ISAPIRewrite\hhtpd.ini
add the following line:
allow URLs without extension to be ended with .aspx
RewriteRule ^/([^.\?]+)/?(\?.*)?$ /$1.aspx$2 [L]
Now on the URL on the browser it is just possible to skip .aspx extension, but it is still possible to use querystring parameters.
The tool is available here:
http://www.helicontech.com/download-isapi_rewrite.htm
It is freeware and I have used it on win2003 installations, XP and Vista.
Regards,
Nico
Cool Nico,
I have seen the tool before but have never used it. I will have another look at it. Thanks.
Regards,
/Dirk
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.