Windows and IIS

Discussion in 'aMember Pro v.4' started by mr1cam26, Oct 31, 2012.

  1. mr1cam26

    mr1cam26 New Member

    Joined:
    Aug 22, 2006
    Messages:
    2
    I was having trouble finding information on Windows IIS installations, and I thought that now I have my setup finalized, I would share some details that work for me.

    One stumbling block was the htaccess rules. Not only does Windows not use the htaccess information, the file structure that is recognized is different than a Linux setup. To get around this I installed IIRF V2.1 found here: http://iirf.codeplex.com/ It does almost everything that htaccess does, with some minor differences.

    Next, I was unable to get the third rewrite rule to trigger. I'm sure it just needs a bit of tweaking, but I found it easier to start from the beginning instead of working with what was there. I found an online tester that helped with doing what I was looking to do: http://www.regular-expressions.info/javascriptexample.html

    Part of the problem was I didn't understand what the original rewrite rule was doing. It just writes a uri back to index.php, but how it passes parameters I don't know. I found another post here that said if you inject /index.php into the url just after the domain name, it will function though the css and javascript references are broken. But it was a bit of information that allowed me to move forward with writing my own rewrite rule.

    Here is the original rule:

    RewriteRule !\.(js|ico|gif|jpg|png|css|swf|csv|html)$ index.php

    This is my new rule:

    RewriteRule ^(/[a-zA-Z0-9\-\?=%_\/&]+)+$ /index.php$1

    The differences are that instead of a reverse match, its a positive, and the matches are stored and applied to the rewrite. Since a (dot) is not in the allowed characters, files that are referenced in the pages are not rewritten, performing the same intent as before.
    As for the cron job, I did a scheduled task every hour of every day.
    Along with some other tweaks, this put my installation to a point of being useful for my purposes. I hope it helps someone else. Feel free to add any other insights or questions!
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Thank you very much for sharing this information!

    May I ask you to post a screenshot of the cron rules settings? I am afraid the last rule is not correct.
  3. mr1cam26

    mr1cam26 New Member

    Joined:
    Aug 22, 2006
    Messages:
    2
    I'm not going to post a screen shot, but I'll put in detail what I have set in order to activate the cron.
    The run command has this:

    C:\php\php-win.exe [amember install directory]\cron.php

    I set this to run daily, repeat every 1 hour for 23 hours and 59 minutes.

    I admit I do need to test this setup though.
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Sorry, I wrote wrong phrase.
    All ok with your cron, but last redirect rule seems to be incorrect.

Share This Page