This is a comment on New installation, /Login results in 404 not found, posted by WikiAdmin at 26.04.2024 11:01

View source for Re: New installation, /Login results in 404 not found

see ((/Doc/English/ModRewrite))

You have somewhere a Apache configuration issue, rewrite_mode should only affect the wiki folder (per-directory context, .htaccess file).

Variant A (preferred)
  * rewrite_mode on (Apache)
  * ##AllowOverride All##
  * ##.htaccess## in wiki root folder (directory context)
    * Setting rules in .htaccess is convenient, especially with multiple websites on the same server. It does not require a server restart for changes to take effect and it does not require root privileges to edit those rules, simplifying maintenance and making changes possible with an unprivileged account.

Variant B
  * rewrite_mode on (Apache)
  * httpd.conf / apache2.conf
    * Any rules that you can put in an .htaccess file can be also put directly into server configuration files. In fact, the official Apache documentation recommends using server configuration files instead of .htaccess because Apache processes it faster that way.
  * remove or rename ##.htaccess## in wiki root folder

Variant C
  * rewrite_mode off (Apache)
  * ##~http://example.com/?page=Login##

Variant D (only for debugging)
  * ##const AUTO_REWRITE = 0;## (in config/constants.php)
  * rename ##.htaccess## in wiki root folder, e.g. ##dist.htaccess##
  * This way you disable the rewrite_mode of WackoWiki even ##LoadModule rewrite_module modules/mod_rewrite.so## is activated.

class/settings.php
%%(php)
<?php

// if .htaccess tell us actual info on mod_rewrite status - use it
if (getenv('HTTP_MOD_ENV') === 'on' && AUTO_REWRITE)
{
	$this->rewrite_mode = (getenv('HTTP_MOD_REWRITE') === 'on');
}
%%