httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blomstrom <david_blomst...@yahoo.com>
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:

[PHP]
 switch ( $MyName )
 {
 case 'About/':
 case 'People/':
 case 'Reference/':
 echo 'It works!';
 break;
 default:
include ($_SERVER['DOCUMENT_ROOT']."/404.php");
 break;
 }
[/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.
Mime
View raw message