mel47 Posted March 26, 2020 Share Posted March 26, 2020 Hi, I'm a little discouraged. The non-profit organisation for which I develop the website decided to move from a (bad) apache server to a windows server they have access for free. But I never worked with IIS, and I'm not sure how to pursue. I have for now 404 pages due to absence of rewrite. For sure, I read this pivotal post from @matjazp with the attached web.config file. But it was in 2016, probably with PW 2.x. My question is : can I still use this file? I'm on windows server 12 R2, PW 3.148, with procache (i guess the module the most related to rewrite rules). Thanks Mel Link to comment Share on other sites More sharing options...
matjazp Posted March 26, 2020 Share Posted March 26, 2020 As far as I know you don't have to use IIS, you can install apache, like XAMPP. But I can confirm PW will work on IIS as I'm on the same infrastructure as you are. I have a bit updated version of web.config here on my local test environment, but even web.config from 2016 should work. But you will need IIS rewrite module for sure. Let me know if I can assist further (like remote access via RDP or TW or anything). 5 Link to comment Share on other sites More sharing options...
pwired Posted March 26, 2020 Share Posted March 26, 2020 Quote The non-profit organisation for which I develop . . . moved to a windows server they have access for free . . . First thing: does it really need to be a dedicated hosting ? If not, no one from that non-profit organisation can afford 25 or 50 euro a year for a good shared hosting ? (hostinger or bluehost) I would do anything to avoid that frustrating and weird "MicroSoft" style windows IIS Server. Link to comment Share on other sites More sharing options...
matjazp Posted March 26, 2020 Share Posted March 26, 2020 4 minutes ago, pwired said: I would do anything to avoid that frustrating and weird "MicroSoft" style windows IIS Server. It could be frustrating and weird, as almost anything on the world... As I said, Apache can be installed if one is familiar with it 1 Link to comment Share on other sites More sharing options...
mel47 Posted March 27, 2020 Author Share Posted March 27, 2020 Thanks for quick answer. Unfortunately I don't have control on those decisions, I even strongly suggested my hosting I used since years for my own PW's site, but it was not the final choice. It works. For now I only discover a problem with date translation, related to setlocale, but couldn't find exactly what I should do. Still trying different version. I had fr_CA.UTF-8 in "C" translation. Mélanie Link to comment Share on other sites More sharing options...
matjazp Posted March 27, 2020 Share Posted March 27, 2020 1 hour ago, mel47 said: I had fr_CA.UTF-8 in "C" translation This could be one of those weirdness pwired mentioned. Windows does not have fr_CA.UTF-8 locale. Please check this link: https://docs.moodle.org/dev/Table_of_locales Also be aware that the %e and %k modifiers are not supported in the Windows implementation of strftime() function. I use this on windows (found somewhere on the net): function mydate($f, $d) { $f = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $f); $f = preg_replace('#(?<!%)((?:%%)*)%k#', '\1%#H', $f); return iconv("", "UTF-8", @strftime($f, $d)); }; and the use it like this (old fashion way): if($lang === "en") $out .= "Publish date: " . mydate("%Y/%m/%d", $post->post_date); else $out .= "Datum objave: " . mydate("%e. %B %Y", $post->post_date); 1 Link to comment Share on other sites More sharing options...
mel47 Posted March 29, 2020 Author Share Posted March 29, 2020 Thanks again. Solve my problem. Have to write french_Canada in C. Let's see what it the next thing that will not work... ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now