![]() |
|
Help with .htaccess rewrite for subdomain for multi language setup - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Translating (https://forum.zenphoto.org/forum-8.html) +--- Thread: Help with .htaccess rewrite for subdomain for multi language setup (/thread-9732.html) |
Help with .htaccess rewrite for subdomain for multi language setup - tunafish - 2012-03-03 On my host my ZP install lives in `
Maybe the mod_proxy is not enabled? Any help greatly appreciated! Help with .htaccess rewrite for subdomain for multi language setup - acrylian - 2012-03-03 Just to be sure, Linking to Help with .htaccess rewrite for subdomain for multi language setup - tunafish - 2012-03-03 Yeah I mean I have set up subdomain http://fr.domain.com pointing to the folder But I am wondering now, I tested sbillard's 9290 changeset on localhost with ZP version 1.4.2.1 [9138] just by adding the 2 lines in zp-core/functions-i18n.php and it seems to work fine?! Help with .htaccess rewrite for subdomain for multi language setup - acrylian - 2012-03-03 I don't know your host but mine lets me direct any domain to any folder on my public html folder or just the root, which would be http://domain.com/fr_FR/ will not help as that url will not be static. It will be used to switch the url but that's all. The reason for the subdomain change, which will also switch languages, is to get separate addresse for each language content without JS and such. If that would do the trick all the talk and trying with the subdomains would not have been necessary at all (unless sbillard changed something else I lost track with). Btw you should NEVER just apply a few line change to an older release. The actual subdomain change involves a few more than that as changes in some plugins like sitemap, html_meta_tags etc. Help with .htaccess rewrite for subdomain for multi language setup - tunafish - 2012-03-03 Well my host does not allow me to set where to point the subdomain, just the contents of the subfolder, bummers. I understand http://domain.com/fr_FR/ is not static, but http://fr.domain.com is and that's what I rewrite for. It will only serve the content of http://domain.com/fr_FR/ and thus change the language, unless I really don't get it.. OK I understand I should not just change files to an older release, I just want to prepare my subdomains on the production site when 1.4.3 get's released :-) Help with .htaccess rewrite for subdomain for multi language setup - tunafish - 2012-03-03 Let me see.. a request is made for fr.domain.com we are on domain.com/news/ we are on fr.domain.com/news/ Help with .htaccess rewrite for subdomain for multi language setup - acrylian - 2012-03-03 Ok, I guess I indeed got your wrong as I could not imagine such restrictions from a host (I use only shared hosting and on all I know that is possible...). Sorry. Try something like Help with .htaccess rewrite for subdomain for multi language setup - sbillard - 2012-03-03 I think your confusion is with the folder name. If you are using subdomain locales (which is available in 1.4.2.2, btw) then you do NOT also use the folder. So if your site is installed in If your host indeed does not allow you to pick a specific folder for the subdomain then you will not be able to use this strategy. But if that is really the case you should ask them why. Help with .htaccess rewrite for subdomain for multi language setup - tunafish - 2012-03-03 Yeah it's crazy, they don't allow it. I asked them and they said it's not supported on their shared hosts, upgrade to dedicated blahblah. In this way the visitor or search engine will still see fr.domain.com/anything as address. Help with .htaccess rewrite for subdomain for multi language setup - sbillard - 2012-03-03 But of course, .htaccess will not work, since Zenphoto will see only the primary domain. Usually when a company thinks it knows better what I want to do than I do I will find a replacement company. Maybe you should look into a different provider. Help with .htaccess rewrite for subdomain for multi language setup - sbillard - 2012-03-04 If you wish to try it, the development build nightly will (after tonight) attempt to insert the locale into urls if you have the seo_locale plugin enabled. There may be some urls missed, so let us know of any issues. it will create links in the form /language/normal link Help with .htaccess rewrite for subdomain for multi language setup - tunafish - 2012-03-05 sbillard, WOW! I will check it out this week. Thanks so much :-)) But [quote]But of course, .htaccess will not work, since Zenphoto will see only the primary domain. [/quote] My structure is like this: If the domain.com/language/contents approach will become supported in ZP that would rock!! Help with .htaccess rewrite for subdomain for multi language setup - sbillard - 2012-03-06 Zenphoto sees the "rewitten" uri so a rewrite rule that changed the HOST from fr.public.com to public.com would leave Zenphoto without the fr prefix. The domain.com/language/contents will likely be supported. But it will need considerable debugging to be sure that nothing is missed (that is where you can help.) So long as all problems end up fixable the feature will be supported. But be aware that it does require Zenphoto to do a full redirect for each page requested. That is why the language.domain approach is prefered. |