Question
I'm a big fan of
CoolURIsDontChange more for the simple, human-readable (and human-create-able) URI structures then for the non-changing part.
To this end, I find the "bin/view" part of the TWiki URIs/URLs to be quite superfluous. imho, TWiki don't need this part to make sense of the URIs, only machines do. So I'm trying to elminate this part.
The problem is the "view" part; I can't yet get it to work in every scenario with all the combo TWiki.cfg/httpd.conf tricks I try. What I have this far allows my users to go to
http://mysite.com/wiki/view/Main/MattEngland
without any problems. I'd rather this URI read like
http://mysite.com/wiki/Main/MattEngland
and the edit/change links read like
http://mysite.com/wiki/bin/edit/Main/MattEngland
...but I can't find a way to get the TWiki Cairo struct to allow for this.
Any thoughts of how to accomplish this mission?
Note that I'm not in a position to rename my server/domain to something like twiki.mysite.com; in my case, mysite.com is an SSL-protected hosted, and I need subpath URLs hanging off of that host or things get extremely cumbersome for me as secure-remote-site administrator (DNS, Apache, etc changes)...not to mention the SSL licensing, etc.
I tried redirecting /wiki/view with an Apache directive, but then the anchors in the generated pages cause hits back on the server instead of jumping quickly to the anchor...not good.
(I can at least get the /wiki part to redirect to /wiki/view with an Apache line. I also alias /topic and /topics to /wiki/view, but that doesn't help the click-thrus much.)
Here are my pertinent, current TWiki.cfg and httpd.conf sections to get the above behavior:
# %SCRIPTURLPATH% : cgi-bin URL path for TWiki:
$scriptUrlPath = "/wiki";
# URL path to scripts used to render links. Change if using redirection to shorten URLs
$dispScriptUrlPath = $scriptUrlPath;
# URL path to view script used to render links, relative to $dispScriptUrlPath
$dispViewPath = "/view";
# %PUBURLPATH% : Public data URL path for TWiki (root of attachments) :
$pubUrlPath = "/wikifiles";
# Public data directory (file path not URL), must match $pubUrlPath :
$pubDir = "$thisInstallHomePath/twiki/pub";
ScriptAlias /wiki "/www/biz2tek.com/twiki/bin"
Alias /wikifiles "/www/biz2tek.com/twiki/pub"
Alias /topics "/www/biz2tek.com/twiki/bin/view"
Alias /topic "/www/biz2tek.com/twiki/bin/view"
RedirectMatch ^/wiki[/]*$ https://biz2tek.com/wiki/view
--
MattEngland - 14 Apr 2005
Environment
--
MattEngland - 14 Apr 2005
Answer
See
Codev.ShorterURLs,
Codev.ShorterCaseInsensitiveURLs and
HostedShorterCaseInsensitiveURLs.
--
PeterThoeny - 14 Apr 2005