Page 2 of 2

Re: Can I use ISAPI Rewrite [www.isapirewrite.com]?

Posted: Tue Feb 28, 2006 2:45 pm
by LeisureLarry
wms wrote: Hi,

I changed this line in my config.php file:
$config['assume_mod_rewrite'] = true;  (from false)

And now all my menu items point to 'somepage.html' which gives me a 'page not found'.

Hmmmm...interesting.....still pounding away at it.... :P
Do this again :D

Re: Can I use ISAPI Rewrite [www.isapirewrite.com]?

Posted: Tue Feb 28, 2006 2:55 pm
by wms
;D

YES!  Thanks Larry....good eye!!!

Finally after three days....I got it with all of your help!!

So for the others out there, here is what I did to clean up my URLs on a Windows Server:

1) Make sure ISAPI ReWrite is installed [by your host or yourself]
2) Create a httpd.ini file in your root directory
3) Here is the httpd.ini:
[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]

# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]

#RewriteCond Host: (.*)
#RewriteRule ([^.?]+[^.?/]) http\://$1$2/ [I,R]

RewriteRule /([^/]+)\.html /index.php\?page=$1 [I,L]


4) Change these two lines in your config.php to this:
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';


If I missed anything, please let me know...but I do believe that's what I did.  Wow, it seems so simple now.

Thanks again for all of your help.

Re: Can I use ISAPI Rewrite [www.isapirewrite.com]?

Posted: Tue Feb 28, 2006 3:45 pm
by LeisureLarry
And now wishy or Patricia should put the file as an example in the doc folder of the core :D

Re: Can I use ISAPI Rewrite [www.isapirewrite.com]?

Posted: Thu Mar 02, 2006 11:40 am
by GwynPerry
Glad to see this has been solved.
I've been unable to access anything from the cmsmadesimple.org domain since monday. I thought the site was down, but it turns out my router had decided the domain was some kind of threat and had completely firewalled it. Crazy!

One question:
How does CMSMS handle heirarchical links?
I've seen one hack that allowed them to be displayed as:

Code: Select all

www.domain.com/first_parent/second_parent/child.html
How would they be passed to the index.php?
I think this may have some effect on the rewrite rules for ISAPI_rewrite.

Re: Can I use ISAPI Rewrite [www.isapirewrite.com]?

Posted: Thu Mar 02, 2006 12:11 pm
by LeisureLarry
I think you are refering to the following thread:

http://forum.cmsmadesimple.org/index.ph ... 590.0.html

As this thread shows a solution which uses another apache rewrite rule,
you´ll have to change the isapi rule as well.

But I wouldn´t use it, as the author describes several issues.

Greats LeisureLarry

Re: Can I use ISAPI Rewrite [www.isapirewrite.com]?

Posted: Wed Jun 20, 2007 10:32 am
by hadion
is it also possible to add a line for the news module? can't make that work!!! :(