RE: [users@httpd] Need a mod-rewrite rule for a website's home page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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¢/min.
[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux