We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28513
    • 53 Posts
    I am totally lost on this too. Current client is self-hosted on his own IIS server. Did not know what I was getting into with that. He has ISAPI_Rewrite installed and I don’t really know where to go from there. I have tried pasting the code mentioned in this thread into the .htaccess file via FTP in the root. No luck on anything. I am also not able to get file from the manager to show up, they just show up as assets/ instead of /assets and it can not find the image. Could these be related problems with IIS? I did not have these problems with the others sites I have done.

    Thanks for any help, hope to solve this soon.
    • With my first ISS/MODx encounter a couple weeks back, I simply pasted the contents of the regular .htaccess file into a blank iirf.ini file. Worked a charm.

      This was on a shared host so I didn’t pay much attention to the set up. I’m guessing they use http://iirf.codeplex.com/ as Kolos posted.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 21122
        • 153 Posts
        Hi Mark,

        Were you able to get FURLs working with Revolution?

        I have a solution currently working with Evolution, but this doesn’t seem to with with Revolution.

        Still searching...
          • 14164
          • 1 Posts
          Quote from: neilp123 at Aug 20, 2010, 11:42 AM

          Hi Mark,

          Were you able to get FURLs working with Revolution?

          I have a solution currently working with Evolution, but this doesn’t seem to with with Revolution.

          Still searching...

          Just echoing...

          If anyone has a tip to get FURLs with MODx Revolution working I would be over the moon laugh

          Thanks
          jj
            • 11887
            • 34 Posts
            Hello

            My .htaccess file (in wwwroot) looks like this (I nabbed an example from above, and changed the .html to .php to suit my needs):

            
            RewriteEngine On
            RewriteCompatibility2 On
            RepeatLimit 32
            RewriteBase 
            
            #  Block external access to the httpd.ini and httpd.parse.errors files
            RewriteRule ^/httpd(?:\.ini|\.parse\.errors).*$ / [NC,F,O]
            #  Block external access to the Helper ISAPI Extension
            RewriteRule ^.*\.isrwhlp$ / [NC,F,O]
            
            RewriteRule ^/(?!(?:manager|assets)/)(.*)\.php(?:\?(.*))?$ /index.php?q=$1?2&$2: [NC,L,U]
            
            


            ... and the basic URL rewriting feature of ModX is working for me.

            However I now have three problems:


            • I have existing pages in the root of my site which I need to continue to work whilst I migrate my site into ModX. e.g. mysite.com/faq.php - the URL remains correct in the address bar of my browser but it shows the contents of my ModX start page (/index.php). I need to edit my .htaccess to account for this. Even if I put in exceptions for each page name manually, it’s fine for now
            • If I enter into my address bar mysite.com/blah/blah/blah/blah.php even if that path and page doesn’t exist within ModX, it shows the contents of my index page ... but keeps that in the address bar. Is there any way I can prevent this? Even if it doesn’t show a 404 error, if it just automatically redirects the page to /index.php and shows that in the address bar - can this be done?
            • Finally is there any way ModX can support the use of entering a path to get to a certain address? e.g. let’s say I enter mysite.com/faq, this would automatically redirect to mysite.com/faq/index.php - in the same way a web server would automatically assume this if you entered a subdirectory of a site?

            Can anyone assist me with the above?

            Hope that makes sense, would really appreciate your input. The first point is the most important one for me right now as I port my site to ModX!

            Many thanks,

            Mat

            p.s. I’m using ModX Evo right now.
              • 19629
              • 21 Posts
              [Problem Solved]

              ...........................................

              Forget using ISAPI did not work for me.

              I used a piece of software called IIS Mod-Rewrite Pro and worked a charm. You do not even need to mess around with any .ini files works straight off with the .htaccess file that comes with the modx install.

              ...........................................

              Hi There,

              I have just got ISAPI set up and done the .ini .htaccess files.

              The website is working okay on the front end, no problems there.

              But now the admin does not work. The menus are there and everything but nothing loads. As soon as I delete the .htaccess file it works fine. Is there a way to make the rewrite rule ignore the manager folder.

              All hep is much appreciated.
                • 11887
                • 34 Posts
                Hi all

                Can anyone help with my IIS / ModX FURLs issue?

                Please see my post (see 2 above) - I don’t need help with the first point as I’ve now ported most of my site over to ModX and switched on FURLs and the htaccess rule, so there’s no going back!

                But if anyone could look at the htaccess I posted above and help with the following points:



                • If I enter into my address bar mysite.com/blah/blah/blah/blah.php even if that path and page doesn’t exist within ModX, it shows the contents of my index page ... but keeps that in the address bar. Is there any way I can prevent this? Even if it doesn’t show a 404 error, if it just automatically redirects the page to /index.php and shows that in the address bar - can this be done?
                • Is there any way ModX can support the use of entering a path to get to a certain address? e.g. let’s say I enter mysite.com/faq, this would automatically redirect to mysite.com/faq/index.php - in the same way a web server would automatically assume this if you entered a subdirectory of a site?

                If I’ve missed the answer to one of these questions on another thread, please let me know - although I have searched high and low!

                Thanks.
                • 1. That’s because the main index (home) page is set to be your "not found" page in your site’s configuration. You can modify the usual MODx "404" behavior with a plugin using the OnPageNotFound event (or whatever that event is called in the version you’re using).

                  2. Since all resources are accessed from the main MODx index.php file, as far as I know there’s no way to do that. You can, however, configure FURLs to use paths based on the resource tree structure, for example you could have mysite.com/news/august/big-august-sale.html
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 11887
                    • 34 Posts
                    Quote from: sottwell at Dec 01, 2010, 06:05 PM

                    1. That’s because the main index (home) page is set to be your "not found" page in your site’s configuration. You can modify the usual MODx "404" behavior with a plugin using the OnPageNotFound event (or whatever that event is called in the version you’re using).

                    2. Since all resources are accessed from the main MODx index.php file, as far as I know there’s no way to do that. You can, however, configure FURLs to use paths based on the resource tree structure, for example you could have mysite.com/news/august/big-august-sale.html

                    Re your point #1, thanks - I’ve got it now.

                    I’m still really struggling with point 2 though. I already have FURLs configured to use paths based on the resource tree structure (really nice). I would like "mydomain.com/news" to resolve to "mydomain.com/news/index.html"

                    Web host already looks in subdirectories for a set of files (index.html or index.php, etc.), however since moving my site to ModX and implementing the following rule:

                    RewriteRule ^/(?!(?:manager|assets)/)(.*)\.php(?:\?(.*))?$ /index.php?q=$1?2&$2: [NC,L,U]


                    This isn’t happening any more. (It’s an issue because I have personally invested in marketing that points people to mysite.com/subdir). I do already have a resource under the "subdir" container with the url-alias set to "index" and as you can see my Friendly URL extension is .php

                    So I’m guessing it’s just a case of modifying my htaccess file (see my post where I’ve included my current htaccess file above) which must be currently preventing this.

                    Any help greatly appreciated.
                      • 36632
                      • 202 Posts
                      Currently I'm working off an IIS7 server via its IP#. I used Aaron's htaccess code but in the httpd conf file via the ISAPI Reqrite Manager app.

                      I know it's working because it's not: no such thing as http://www.65.444.32.117/

                      Once I get the site launched I can fill out the Friendly URLs part, but for now I have to wait and I know that's not helpful for this thread.