Like 35-40,000 others, I run a Postnuke site. The main issue folks have with Postnuke is its decidely search engine unfriendly URL's. At least 80% of any given PN site goes without indexing due to the URL scheme.
Now, some nice person wrote a mod_rewrite and output buffering hack which attempts to change this:
http://www.ulujain.org/modules.php?op=modload&name=Messages&file=index
into:
http://www.ulujain.org/Messages.html (doesn't exist)
It doesn't work consistently though and in places, actually generates 404 errors.
I tried this from the command line:
ln -s "modules.php?op=modload&name=Messages&file=index" messages.php
It works for some, but not all links. Weird thing is, when it does work, it loads the page, but generates a 404 error anyway.
Postnuke uses this schema to load its modules (sections, like News, Links, Comments, etc)
module.php?op=modload&name=Modulename&file=index
In real path terms, this is docroot/modules/Modulename/index.php but they've used a security mechanism to avoid you loading it that way
if (!defined("LOADED_AS_MODULE")) {
die ("You can't access this file directly...");
}
or
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
This is done as Postnuke uses a global permissions system and session-based authentication. Like most PHP-driven sites do, I guess
What I'd like to know is there something I can do in PHP that'll allow me to link to the module index.php safely? I.e a PHP type symlink I can load such as:
if ((module.php?op=modload&name=Modulename&file=index)
do (modules/Modulename/index.php));
I appreciate the above isn't proper PHP, but you get my meaning.
Any and all help is appreciated and you'd be doing the PN community a large favor!