Ticket #604 (new defect)

Opened 3 years ago

Last modified 7 months ago

Generation of .htaccess rules, specifically RewriteBase

Reported by: JavaWoman Owned by: unassigned
Priority: normal Milestone: 1.4
Component: installer Version: 1.1.6.3
Severity: major Keywords: installer
Cc: JavaWoman, DotMG

Description

Two items migrated from  http://wikkawiki.org/SuggestionBox about generating a RewriteBase rule when appropriate. Please note that the (often repeated) "subdirectory" argument is actuall a red herring: a RewriteBase rule is needed (even for a root install) if the document root for the site is aliased; this is often (but not necessarily) the case in shared hosting environments. What remains is the (repeated) suggestion to automatically create this rule when needed because in such environments rewriting just won't work without it.

1. mod_rewrite idea (.htaccess) (The following was copied from a comment on  ModRewrite -- JavaWoman) Hi, I discovered that the default .htaccess included did not work for my setup up. I needed to include RewriteBase /directory/ as well since Wikka is installed in a subdirectory. I hope this helps anyone having trouble getting Wikka to work. -- h-67-102-97-191.mclnva23.covad.net (2005-02-11 04:49:37) The installer correctly deduces the base path for the configuration; it could conceivably also detect if it's sitting in a subdirectory, and if so, dynamically change the .htaccess file and include the correct RewriteBase statement to take care of this. --JavaWoman

2. Create rewrite rules on install

copied from comment on  WikkaInstallation --JavaWoman

Since I installed wikka in a subdirectory under the domain root I needed to add the following to the .htaccess file just under "RewriteEngine on":

RewriteBase /subdirectory/

Devs, how about writing the .htaccess rules at the same time you write out the wikka.config.php file since you automatically pickup the wiki base location at that point?

-kt --  KarmaTester (2005-01-26 06:52:07)

Change History

Changed 3 years ago by JavaWoman

  • cc JavaWoman, DotMG added; dotmg@… removed
  • severity changed from normal to major

Changed 3 years ago by DotMG

If you set milestone to 1.1.7, then, this suggestion is already addressed in trunk. See that on initial install, RewriteEngine Off is in the file by default. It won't change to On until the installer can update the .htaccess.

Changed 18 months ago by DarTar

  • milestone changed from 1.2 to 1.3

Retargeting to 1.3. Code for this ticket may have already been committed to trunk, from which 1.3 will be branched. Consider backporting urgent issues to 1.2.X

Changed 7 months ago by BrianKoontz

  • milestone changed from 1.3 to 1.4
Note: See TracTickets for help on using tickets.