I want to have clean url feature activated for my site which is hosted on a windows server. I've used the way described in http://drupal.org/node/3854 but it's not working with i18n module enabled. when the language phrase stays in front of "q" variable the "page not found" message appears.
Comments
Comment #1
aghajani commentedIs there anyone to answer?
Comment #2
jose reyero commentedI dont know what you mean by "language phrase stays in front of 'q'". Could you provide some example of links not working?
Btw, Windows server = bad option ;-)
Comment #3
aghajani commentedHi Jose, Sorry for delay.
The problem is whenever I type http://www.test.com/about it works but when I type http://www.test.com/en/about I get Drupal's "page not found" error.
Thanks
Comment #4
aghajani commentedanyone knows the answer?
question = drupal + i18n + iis + clean urls
problem = returns drupal's 404 page.
without i18n enabled clean urls work under iis as mentioned in handbook.
Thanks
Comment #5
Bèr Kessels commentedI think "the answer" is apache. IIS has ghorrible support for url rewriting, and i18n does some really advanced rewriting. So that answer might sound silly, but it is AFAIK the only solution at the moment.
Comment #6
aghajani commentedSorry I knew this answer before but our company has windows server with IIS on it. Drupal's good structure allows to control URLs in a clean style so we can have clean url in IIS with a piece of code and some changes in website configuration. It must be possible to use it with i18n module installed.
Comment #7
pitpit commentedwhy don't u use url aliasing to make http://www.test.com/en/about working ?
Comment #8
jose reyero commentedWell, not really interested in IIS, but we can try to work out something :)
After seeing this page http://drupal.org/node/3854 , which I guess is the code you are using, it seems to me that the problem can be in the following function in i18n.module
Maybe the $_REQUEST variable is not set like in Apache, and then i18n fails to get the original path, and then find an alias for it.
So, if someone can find a solution, maybe some code to be added to the config file, or maybe a patch for i18n.module, we could add some notes to i18n docs or we can try to add that code in the aforementioned help page...
One valid workaround could be to create an alias for en/about as dbdev suggests.
Comment #9
jose reyero commentedComment #10
aghajani commentedThe "about" is just an example of pathes I have. There are so many other path in this site so it's not wise to manualy build them all. There is also so many content in two language and it's not possible to make alias for all of them.
Comment #11
aghajani commentedJose was right. The problem was in _i18n_get_original_path function. It returns the path when the "q" variable is set but nothing when it not (In IIS). So I changed the code like this:
Now it works.
Thanks Jose.
Comment #12
(not verified) commented