Tags:
create new tag
view all tags
Cryptic summary to date (see RenameViewToAview for the blow by blow):

I was looking for a way to rename view to aview so it would appear first in alphabetical order on my browser history list, and/or find other ways to make it easier to type a TWiki URL into the browser address bar.

Contents:

Overview

There have been a lot of suggestions, and I've tested one solution that works to allow me to enter URLs of the form http://twiki.org/a/Codev/RenameViewToAviewWorking instead of http://twiki.org/cgi-bin/edit/Codev/RenameViewToAviewWorking. (It is buried in RenameViewToAview -- I intend to refactor that page at some point in time. It is questionable whether this approach (or the next one) is of any use on, for example, SourceForge, because it requires changes to the Apache httpd.conf file (which SourceForge might not allow).

MartinCleaver has made another suggestion that would allow me to enter URLs of the form http://twiki.org/Codev/RenameViewToAviewWorking (for view, only) instead of http://twiki.org/cgi-bin/edit/Codev/RenameViewToAviewWorking. (And, I've made an enhancement to that which lets me enter edit or preview URLs in a form like this: http://twiki.org/w/edit/Codev/RenameViewToAviewWorking.

Current Status Overview

It seemed to work for a while until I rebooted my Linux machine. After rebooting the machine, the logos (in my template) are not found. I suspect the problem relates to %PUBURLPATH% or %PUBURL%. (Note: I did not test attachments after making the change or before rebooting the machine. After rebooting, attachments don't work, and I suspect the problem is also related to PUBURL, etc..

I am using the 20010315 beta.

The logo links

These are the links which are not working after the change. (They worked fine before the change, they worked after the change to use URLs of the form .../a/..., and worked fine after the change until I rebooted. (I did restart Apache many times in the course of making these changes, simply restarting Apache did not cause the problem to appear, it only happened after rebooting. (The same thing occurred about a week ago when I first tried the change, but I don't recall when the problem manifested itself -- I doubt that I rebooted, but I may have restarted X. But, I don't remember, and I may have rebooted.)

<A href="%WIKIHOMEURL%"><IMG src="%PUBURLPATH%/wikibase.gif" width="61" height="67" alt="WikiLearn Logo"border="0"></A>

<a href="http://TWiki.org/"><img src="%PUBURL%/twikilogo4.gif" width="61" height="64" alt="Powered by TWiki (TM)-- The TWiki (TM) home is at TWiki.org" border="0"></a>

What I've Tried

Since the problem recurred this morning, I have not done much experimentation.

I did change $pubUrlPath to "/pub" (it was "/twiki/pub") in TWiki.cfg. (This sets the %PUBURLPATH% -- I don't know what sets %PUBURL% but I suspect it is done somewhere in a script.)

I made a few changes in view.tmpl just to get a better feel for how an href works. I noticed that the "mouseover" message shows only the first portion of the URL, like "http://192.168.0.8/twiki" in the case of the first link, and http://TWiki.org in the case of the second link.

I did not attempt to add the scriptalias for pub which Martin thought might be required -- I'm this far, I might as well try this now. I'll try this with some variations on the $pubUrlPath variable, and come back later and post some feedback. (I wonder if I'll have to reboot to determine whether it works?)

Update: I'm back, I tried a few things with no success. I did not do any rebooting or shut down of the X-server (I don't know how that could be relevant anyway).

In general, I tried:

  • adding the scriptalias for pub per Martin's suggestion, then tried altering the puburlpath variable (several variations), but all "shots in the dark"

  • making the scriptalias for put an alias, them with some of the same variations to the puburlpath variable

  • and (of course) restarting the Apache server after each change

my httpd.conf

# Original setup (with %SCRIPTSUFFIX% set to "/twiki/bin")
# ScriptAlias /twiki/bin/ "/home/httpd/twiki/bin/"

# Trial setup
ScriptAlias /w/ "/home/httpd/twiki/bin/"
ScriptAlias / "/home/httpd/twiki/bin/view/"

# Martin Cleaver's original suggestion
# ScriptAlias / "/home/httpd/twiki/bin/view/" 
# ScriptAlias /edit "/home/httpd/twiki/bin/edit" 
# ScriptAlias /preview "/home/httpd/twiki/bin/preview"

# Martin wasn't sure about:
# ScriptAlias /pub "/home/httpd/twiki/pub/" 

# Setup to use .../a/...
# ScriptAlias /a/ "/home/httpd/twiki/bin/view/" 

Alias /twiki/ "/home/httpd/twiki/"

<Directory "/home/httpd/twiki">
Order Deny,Allow
Deny from all
</Directory>

<Directory "/home/httpd/twiki/bin">
Options +ExecCGI
SetHandler cgi-script
# To enable access control based on .htaccess:
AllowOverride All 
Allow from all
</Directory>

<Directory "/home/httpd/twiki/pub">
Options FollowSymLinks +Includes
AllowOverride None
Allow from all
</Directory>

my TWiki.cfg

(The comments that start "was" are reminders to me of the original setting of things I tried tweaking.)

# variables that need to be changed when installing on a new server:
# ==================================================================
#                   %WIKIHOMEURL% : link of TWiki icon in upper left corner :
$wikiHomeUrl      = "http://192.168.0.8/twiki";
#                   Host of TWiki URL :    (Example "http://myhost.com:123")
$defaultUrlHost   = "http://192.168.0.8";
#                   %SCRIPTURLPATH% : cgi-bin path of TWiki URL:
$scriptUrlPath    = "/w"; 
# was "/twiki/bin"
#                   %PUBURLPATH% : Public data path of TWiki URL (root of attachments) :
$pubUrlPath       = "/twiki/pub";
# was "/twiki/pub"
#                   Public data directory, must match $pubUrlPath :
$pubDir           = "/home/httpd/twiki/pub";
# was "/home/httpd/twiki/pub"
#                   Template directory :
$templateDir      = "/home/httpd/twiki/templates";
#                   Data (topic files) root directory :
$dataDir          = "/home/httpd/twiki/data";

-- RandyKramer - 02 Aug 2001

Just an update to possibly provide a little bit of closure to this. Without definitely confirming it (more an intuitive thing), I believe that the problem with URLs of the form:

Is that, with the current directory structure, I believe that either %PUBURLPATH% or %PUBURL% must traverse backwards, up the directory structure. Meaning that I would have to try something like:

  • PUBURLPATH%= "/../pub"

That is not the right example, but gives the idea of needing to include the .. in the path to go back up to the parent of the pwd (or the Apache "home directory", or whatever it is). I've done some reading that indicates such is not allowed for security reasons. I won't head any further in that direction.

Thus, the two remaining possibilities are:

-- RandyKramer - 05 Sep 2001

TopicClassification:
FeatureBrainstorming
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2001-09-05 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.