A couple of developers have asked for a change in mod_rewrite. Let me
show you the old and new methods.
Take this link:
Currently phpWebSite would turn it into the following:
Nice and short, but no information on the value indexes. So you would
need to do the following in your uberpage module:
$_GET['var1'] = $id;
$_GET['var2'] = $page;
$_GET['var3'] = $flavor;
Otherwise you could recast the vars into the GET and REQUEST global var
$_GET['id'] = & $_GET['var1'];
You may also have to test for $_GET['var1'] using isset or test for
In retrospect, probably not the most efficient method. Although I
considered the upcoming change initially, I was trying to keep the url
length down. In the end, I think I erred.
Here is the requested change. Take the same link:
The new format would be:
So now the link is longer but we have a more descriptive url. The
indexes are obviously paired with their value. The advantage of this
method is that it easily breaks down into $_GET values. The mod
developer doesn't need to parse $_GET['var(n)']. They will program the
same regardless of whether MOD_REWRITE_ENABLED is on or not.
I am experimenting on adding this change directly to the linkAddress
function. Therefore moduleLink and secureLink will automatically inherit
the change. This will make ALL links use the new style. In my testing,
admin links, that once ignored the mod rewrite, now work with mod_rewrite.
That said, all is not chocolate and roses. First, PageSmith, Block,
Blog, Menu and other content modules will need to check for the old link
versions in the database and fix them. Third party developers will need
to adjust as well. This may effect those without .htaccess or annoy IIS
admins further. Still, they will be able to disable MOD_REWRITE_ENABLED
as always, so they shouldn't be worse off than the previous version.
Respond here or in IRC with your concerns. I will be adding the changes
to subversion in the next couple of days. I hope some of you will have
time to test.
Thanks for your support and I appreciate the devs who brought this to my
Electronic Student Services
Appalachian State University