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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
LeisureLarry

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

Post 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
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

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

Post 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.
LeisureLarry

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

Post by LeisureLarry »

And now wishy or Patricia should put the file as an example in the doc folder of the core :D
GwynPerry

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

Post 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.
LeisureLarry

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

Post 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
hadion
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 26, 2007 10:02 am

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

Post by hadion »

is it also possible to add a line for the news module? can't make that work!!! :(
Post Reply

Return to “CMSMS Core”