Okay, slightly off topic and maybe even support, but still IMO very usefull for others, if possible: I have pathauto rewrite term/tag paths in the form of example.com/places/Amsterdam And I would love that to be available on amsterdam.example.com I dot mind using rewrite rules, but prefer not to use redirects. I also developed a small module that uses hook_term_path (Dries: hint!) [1] to rewrite any rendered "places" links as subdomain links, so that is all taken care of. The only part that remains is the hard part, if possible at all: using apache rewrites to rewrite amsterdam.example.com -> example.com/places/amsterdam Any apache and/or rewrite gurus around who did this, or know if this is possible at all? Regards, Bèr [1] http://api.lullabot.com/api/HEAD/function/taxonomy_term_path -- PGP ber@webschuur.com http://www.webschuur.com/sites/webschuur.com/files/ber_webschuur.asc PGP berkessels@gmx.net http://www.webschuur.com/sites/webschuur.com/files/ber_gmx.asc CVS onder de knie krijgen: http://help.sympal.nl/cvs_onder_de_knie_krijgen
On 22 May 2006, at 9:28 PM, Bèr Kessels wrote:
Any apache and/or rewrite gurus around who did this, or know if this is possible at all?
url() no longer balks at complete urls. Meaning you can provide a complete alias in the form of 'http:// term.domain.com/'. The only missing part is one additional check in the lookup. ie : $src = db_query(db_result("select src from url_alias where dst='% s' or dst='%s'" , $path, "http://$_SERVER[http_host]/$path")); And of course the single signon modifications -- Adrian Rossouw Drupal developer and Bryght Guy http://drupal.org | http://bryght.com
Staying on the url() issue, I think we should consider implementing the recommendations of: http://www.ietf.org/rfc/rfc3987.txt At least the path side. At the moment non-ascii characters are dropped from paths, at least when using path alias. IMO it should be done. This will help supporting with various internationalised websites. A decent overview can be found in http://www.w3.org/International/articles/idn-and-iri/ Cheers, Vlado
The two major browsers handle this differently at the moment. For example, here is a site that places non-Western characters in the URL (Arabic in this case). Firefox will escape the characters in % notation, e.g.: http://www.alquds.co.uk/index.asp?fname=2006\05\05-23\z30.htm&storytitle=ff%DD%E6%D6%ED%20%CA%D3%E6%CF%20%E3%CD%C7%DF%E3%C9%20%D5%CF%C7%E3%20%C7%CB%D1%20%D8%D1%CF%20%C7%E1%E3%CD%C7%E3%ED%C9%20%C7%E1%E1%C8%E4%C7%E4%ED%C9fff Not sure if it is in full compliance with the RFC in question or not. MS IE 6 will put them as is in the URL: http://www.alquds.co.uk/index.asp?fname=2006\05\05-23\z30.htm&storytitle=ffفوضي%20تسود%20محاكمة%20صدام%20اثر%20طرد%20المحامية%20اللبنانيةfff (all this will be unintelligible for most of those on the list). I like standards like anyone else, but if they continue to be ignored by those who own 85% of the market, they are no longer a practical option for the majority of users. On 5/23/06, drupal <vlado@dikini.net> wrote:
Staying on the url() issue, I think we should consider implementing the recommendations of: http://www.ietf.org/rfc/rfc3987.txt
At least the path side. At the moment non-ascii characters are dropped from paths, at least when using path alias.
IMO it should be done. This will help supporting with various internationalised websites.
A decent overview can be found in http://www.w3.org/International/articles/idn-and-iri/
Cheers, Vlado
Op dinsdag 23 mei 2006 11:29, schreef Adrian Rossouw:
On 22 May 2006, at 9:28 PM, Bèr Kessels wrote:
Any apache and/or rewrite gurus around who did this, or know if this is possible at all?
url() no longer balks at complete urls.
Meaning you can provide a complete alias in the form of 'http:// term.domain.com/'.
The only missing part is one additional check in the lookup.
ie : $src = db_query(db_result("select src from url_alias where dst='% s' or dst='%s'" , $path, "http://$_SERVER[http_host]/$path"));
Yup. Another case where its impossible to do without core hacks. I tried a lot, created a module that implements abovementioned queries, modified, to alter the $_GET[1] I patched pathauto to allow http:// [2] but that is not much use, because of the nature of the url() and l() calls. They refuse to look at the path, and make it absolute when required. So I am now seeing links like http://kaisu.org/http://galloway.kaisu.org instead of http://galloway.kaisu.org (the alias is http://galloway.kaisu.org -> taxonomy/term/77) This is BAD. at least for my case it it. Was this not fixed in 4.7? I though Drupal handled external urls? Why not in this case, then? Note that the links above point to a development site, so I cannot guarantee that you see a representative example there. In short: So far I am lost, it seems Drupal is not ready for the task I want it to perform. I will look at some mod_rewrite hadling now, hope that might prove a better solution then this one. Bèr -- PGP ber@webschuur.com http://www.webschuur.com/sites/webschuur.com/files/ber_webschuur.asc PGP berkessels@gmx.net http://www.webschuur.com/sites/webschuur.com/files/ber_gmx.asc CVS onder de knie krijgen: http://help.sympal.nl/cvs_onder_de_knie_krijgen
forgot the references: [1] http://drupal.pastebin.com/732829 (module to handle incoming foo.example.com aliases) [2] http://drupal.pastebin.com/732831 diff for pathauto Op dinsdag 23 mei 2006 14:04, schreef Bèr Kessels:
Op dinsdag 23 mei 2006 11:29, schreef Adrian Rossouw:
On 22 May 2006, at 9:28 PM, Bèr Kessels wrote:
Any apache and/or rewrite gurus around who did this, or know if this is possible at all?
url() no longer balks at complete urls.
Meaning you can provide a complete alias in the form of 'http:// term.domain.com/'.
The only missing part is one additional check in the lookup.
ie : $src = db_query(db_result("select src from url_alias where dst='% s' or dst='%s'" , $path, "http://$_SERVER[http_host]/$path"));
Yup. Another case where its impossible to do without core hacks.
I tried a lot, created a module that implements abovementioned queries, modified, to alter the $_GET[1]
I patched pathauto to allow http:// [2] but that is not much use, because of the nature of the url() and l() calls. They refuse to look at the path, and make it absolute when required.
So I am now seeing links like http://kaisu.org/http://galloway.kaisu.org instead of http://galloway.kaisu.org (the alias is http://galloway.kaisu.org -> taxonomy/term/77)
This is BAD. at least for my case it it. Was this not fixed in 4.7? I though Drupal handled external urls? Why not in this case, then?
Note that the links above point to a development site, so I cannot guarantee that you see a representative example there.
In short: So far I am lost, it seems Drupal is not ready for the task I want it to perform.
I will look at some mod_rewrite hadling now, hope that might prove a better solution then this one.
Bèr
-- [ End user Drupal services and hosting | Sympal.nl ] CVS onder de knie krijgen: http://help.sympal.nl/cvs_onder_de_knie_krijgen
participants (4)
-
Adrian Rossouw -
Bèr Kessels -
drupal -
Khalid B