Re: [phpodpworld-users] SEF in phpODPWorld
Status: Beta
Brought to you by:
hansfn
From: Hans F. N. <Han...@hi...> - 2007-03-27 00:19:58
|
* Darryl Koster <dk...@se...> [2007-03-27]: > I have $config["use_rewrite"] = true; set in the config.inc.php, and am > using example1.htaccess as my .htaccess file. > > When I click on say, "Personal Pages" on my site I get a 404 "The > requested URL /Computers/Robotics/Personal_Pages was not found on this > server." Thx for the added info. I must admit that I didn't tell the complete truth - I use the content of example1.htaccess directly inside the Apache config file (httpd.conf/apache.conf or whatever it's called on your machine). This might make a difference because (quote from http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule): When using the rewrite engine in .htaccess files the per-directory prefix (which always is the same for a specific directory) is automatically removed for the pattern matching and automatically added after the substitution has been done. This feature is essential for many sorts of rewriting; without this, you would always have to match the parent directory, which is not always possible. This seems to indicate that you should replace all (three) occurences of "^/" with just "^" in the .htaccess file. Let me know if it helps (and I'll update the docs/example files). The reason I think this should work is: > I enabled the rewrite log, and this is what I got below for that: > ----------------------------------------------------------------------- > > 192.168.168.163 - - [26/Mar/2007:16:42:54 --0700] > [www.robotmoz.com/sid#757578][rid#9605b8/initial] (3) [perdir > /www/robotmoz.com/public_html/] add path info postfix: > /www/robotmoz.com/public_html/Computers -> > /www/robotmoz.com/public_html/Computers/Robotics/Personal_Pages > 192.168.168.163 - - [26/Mar/2007:16:42:54 --0700] > [www.robotmoz.com/sid#757578][rid#9605b8/initial] (3) [perdir > /www/robotmoz.com/public_html/] strip per-dir prefix: > /www/robotmoz.com/public_html/Computers/Robotics/Personal_Pages -> > Computers/Robotics/Personal_Pages > 192.168.168.163 - - [26/Mar/2007:16:42:54 --0700] > [www.robotmoz.com/sid#757578][rid#9605b8/initial] (3) [perdir > /www/robotmoz.com/public_html/] applying pattern '^/index.php$' to uri > 'Computers/Robotics/Personal_Pages' We are trying to match something that starts with a slash with something that doesn't... Regards, Hans PS! www.robotmoz.com looked really nice. At first glance there is only one minor glitch (on my screen) - the languages/links in the "This category in other languages" box is almost impossible to see. |