MESSAGE
DATE | 2013-03-20 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] yabb
|
On Wed, Mar 20, 2013 at 09:38:30AM -0400, David Sugar wrote: > Isn't this what the existing apache uri rewrite rules/module is also normally > used for, to do translations between uri paths and cgi arguments? I recall > mediawiki can use rewrite rules to normalize document paths to feed the core > app. Why do they have/want to do it differently than anyone else has?
Well, this is what they have documented:
http://www.yabbforum.com/codex/YaBB.pl?num=1191988956
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ how to setup permalinks
create a .htaccess file with the following line in it.
Code Select All
RedirectMatchUrl ^/virtual_url/(.*)$ http://yourdomain.com/cgi-bin/yabb2/YaBB.pl?
virtual_url is the path part you name in the permalink settings eg. "messages" Keep in mind that this path part is really virtual and should not be an existing folder inside your webspace !!!
upload this .htaccess file in your www root on the server
The following translation is now made for you
http://yourdomain.com/cgi-bin/yabb2/YaBB.pl?num=1196612365
gets translated in a permalink looking like:
http://yourdomain.com/messages/2007/12/02/boardname/1196612365
if the user's server does not implement the RedirectMatchUrl Apache directive. For those that need something on a nix machine that doesn't produce a 500 Internal Error, they might want to give this a try:
Code Select All
RewriteEngine On RewriteCond %{REQUEST_URI} topics/(.*)/([^/]+\.[^/]) RewriteRule ^topics/([0-9]+)/([0-9]+)/([0-9]+)/([^/]+)/(.+)$ http://mydomain.com/$5 [L]
RewriteRule ^topics/(.+)/(.+)$ http://mydomain.com//YaBB.pl?num=$2 [L]
~~~~~~~~~~~~~~~
You tell me what that means.
Ruben
> Doing it as a kind of redirect just seems bizaare to me. But I have heard > equally bizzare things recently, like people insisting that file managers > should now only present case insensitive file ordering, when of course the > native file system is and always have been case sensitive... > > Ruben Safir wrote: > > > This is an example of something that is just a PIA to churn through, > > partly because these idiots are splicing an ISII crapolla fix into > > their "documentations", and secondly because assume your sitting on > > someone elses webserver, rather than your own, and thirdly because > > they believe that your apache set up has a rather rare and somewhat > > insecure module installed for RedirectMatchUrl, and then ... > > > > their last instruction fails to identify what the hell the code is > > for! Is it httpd.conf? Is it perl code to drop into the application? > > > > The who concept is to redirect a static uri like > > > > http://www.myuri.com/messages/some_numbers_as_arguments > > > > to their cgi engine automaticaly, to be translated to look > > internally as something like this: > > > > > > http://www.myuri.com/cgi-bin/yabb.pl?some_numbers_as_arguments > > > > > > It would be just simpler to drop down to mod_perl and add it as a > > script into the apache calls under the URI of > > > > http://www.myuri.com/messages/ > > > > and be done with it.... > > > > The whole discussion of symbolic links to directories is just confussing > > the issue. There doesn't need to be any real directory when the server > > is picking up that uri and handling it entirely within the apache > > engine. > > > > Ruben > >
|
|