httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blomstrom <>
Subject RE: [users@httpd] Need a mod-rewrite rule for a website's home page
Date Thu, 27 Apr 2006 18:53:09 GMT
I just found a pretty effective fix. I added slashes after each entry in my "exceptions" switch:

 switch ( $MyName )
 case 'About/':
 case 'People/':
 case 'Reference/':
 echo 'It works!';
include ($_SERVER['DOCUMENT_ROOT']."/404.php");

Now, if I type mysite/About/ into my browser, it works as it's supposed to. If I type mysite/About
(no ending slash), it still displays properly, though the URL nevertheless defaults to http://gw/About/?home=About

So I guess that fixes it, though I'd still appreciate any cosmetic fixes that might nix those
sloppy default URL's. :)

Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1&cent;/min.
View raw message