We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9162
    • 39 Posts
    Hi guys,

    My apologies if the answer is already in some other post somewhere, but I couldn’t find it.

    My problem is this... I’ve tried to activate friendly URL’s, but it doesn’t work. My site is hosted on a shared hosting account running on a windows server with IIS and PHP 5, etc. So therefore no Apache, and I’m also not sure how much custom php.ini stuff I can edit.

    Anyways, I’ve added the base url in the head tags of my site template, redirected the custom 404 error page to ./index.php. I made sure that the zlib.output_compression and zlib.output_compression_level is commented out in my custom php.ini file.

    But still no luck when turning on friendly urls. I just get this error:
    "The system cannot find the file specified" ... when it tries to open up the generated .html page.

    Any ideas?

    Thanks
      • 9162
      • 39 Posts
      Hi,

      Ok well I found this one post that said to make the prefix for the friendly URL something like "index.php?q=" instead of just "page" or something.

      Therefore the URL will be
      http://somedomain.com/q=mypage.html
      and not
      http://somedomain.com/mypage.html


      At least this works, but is it possible to have the URL look like the latter instead of the former using PHP5 / IIS?

      Thanks again.
        • 9162
        • 39 Posts
        And I’m using 0.9.6.1 of modx.
        • Friendly URLs will not work on a standard IIS install; you’d need apache for that. There are ways to get it to work – see the Windows/IIS topic for that (moving this there).
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 2734
            • 165 Posts
            For clarification: this is not a MODx nor a PHP issue. Friendly URLs use the Apache Module mod_rewrite for URL rewriting. I don’t know if something similar exists for IIS but it surely won’t work out of the Box. Albeit this can be done, as rthrash pointed out. Just look around in the forums.
              • 4639
              • 36 Posts
              Hi,

              Check this http://modxcms.com/forums/index.php/topic,10915.0.html

              Friendly URLs does work on IIS (windows), it’s just that you need to install aditional software on the server. You should talk to your host.
                • 30586
                • 3 Posts
                MODx friendly URLs are based on mod_rewrite. To get them work on IIS you can install IIS Mod-Rewrite Pro. They say it is 100% compatible with mod_rewrite, and it appears to be true as it proves to work perfect so far.

                Remember to rename the file "ht.access" to ".htaccess". Then open it and comment out the line "RewriteBase /".

                If you are on a shared server, ask your webhosting provider if they can install it.