Troubleshooting

From The Lyceum Wiki

Jump to: navigation, search

/register, /login, and /profile come up as 404 Not Found

Most likely this is a problem with the rewrite rules that Lyceum creates upon installation. If you have a path set incorrectly in your wp-config, this would result in incorrect rules being written to the .htaccess file and thus every page would be redirected to a bad URL. Thus go back and check your paths and if any are wrong, you need to re-install Lyceum. You may also wish to check that you have mod_rewrite set up correctly on your server. If you are running IIS, then you need to install a URL rewriting modification which works like Apache's mod_rewrite. Some examples may be found here

If you are running Apache, in your web server configuration (httpd.conf), make sure that mod_rewrite is enabled by uncommenting the following lines:

    # LoadModule rewrite_module modules/mod_rewrite.so
    # AddModule mod_rewrite.c

and in the <Directory> configuration for the lyceum directory, make sure AllowOverride is active by having the line

    AllowOverride All

An example Directory configuration might look something like this:

    <Directory /lyceum>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

For shared hosting, where editing the httpd.conf file is not an option, there is a layman's workaround. If reinstalling lyceum does not take care of the problem, do this:

Create a portal.php file on the root directory (right where the wrong redirects are sending the visitor, in my case http://www.badwolfblogs.com/ instead of http://www.badwolfblogs.com/lyceum).

Inside the <body> tags, enter a link like <a href="http://www.badwolfblogs.com/lyceum/portal.php">Please click here to continue</a>

This will force the user to click once more, every time the redirect does not work, but it will avoid the error message. For my installation, the register worked fine, but the login and log out botched. It's an ugly fix, but it is better than users leaving because of error messages.

Lyceum complains that it needs file write access

In *nix environments, chmod the lyceum root folder to 777 along with all the subdirectories and files.

In Windows, browse to the root lyceum folder and right click on it, go to properties, uncheck 'read only' and click 'apply.' Choose to apply changes to all subfolders and files.

Can't log in or register after installation (404 not found)
  1. Go to portal.php
  2. Just under the blue banner will be a link: System Settings, go there and login with the admin account.
  3. Then follow the links to create a .htaccess file
Categories, single-post, pages, archives etc all re-direct to the main blog page

This problem does not seem to effect all users, however it did effect me. My resolution was to duplicate a set of rewrite rules from a wordpress blog and use in conjunction with the Lyceum generated ones.

A small edit is required to enable the multi-blogging part: you must add an extra set of regex for the blog slug which then resolves to &b=$

Example:

RewriteRule ^(about)/trackback/?$ index.php?pagename=$1&tb=1 [QSA,L]

becomes

RewriteRule ^([^/]+)/(about)/trackback/?$ index.php?b=$1&pagename=$2&tb=1 [QSA,L]

note that because the blog slug is at the start of the string it becomes $1 and therefore the old $1 has become $2.

here is my complete .htaccess file:

# BEGIN Lyceum

	RewriteEngine On
	RewriteBase /mikeey09876/lyceum

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^profile/? wp-admin/profile.php?%{QUERY_STRING} [L]
	RewriteRule ^login/? wp-login.php?%{QUERY_STRING} [L]
	RewriteRule ^register/? wp-register.php?%{QUERY_STRING} [L]

#	RewriteRule ^([^/]+)/wp-comments-post(.*).php wp-comments-post$2.php [L,QSA]

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^([^/]+)/admin/?$ wp-admin/index.php?b=$1& [L]

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^([^/]+)/admin/?([^/]+php)\??(.*) wp-admin/$2?b=$1&%{QUERY_STRING} [L]
  RewriteRule ^([^/]+)/xmlrpc.php xmlrpc.php?b=$1 [L]

#	RewriteCond %{REQUEST_FILENAME} !-f
#	RewriteCond %{REQUEST_FILENAME} !-d

	### I'm pretty sure we'll never need these -jjb ###
#	RewriteCond %{REQUEST_URI} !^(.+)/admin(.*)
#	RewriteCond %{REQUEST_URI} !^(.+)/index.php(.*)

#	RewriteRule ^([^/]+)/([^/]+)-([0-9]+)(/[0-9]+)?/?$ index.php?b=$1&p=$3&page=$4 [QSA,L]

#copied from WP 2.0.5-RC1 with some minor tweaks
RewriteRule ^([^/]+)/(about)/trackback/?$ index.php?b=$1&pagename=$2&tb=1 [QSA,L]
RewriteRule ^([^/]+)/(about)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&pagename=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/(about)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&pagename=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/(about)/page/?([0-9]{1,})/?$ index.php?b=$1&pagename=$2&paged=$3 [QSA,L]
RewriteRule ^([^/]+)/(about)(/[0-9]+)?/?$ index.php?b=$1&pagename=$2&page=$3 [QSA,L]
RewriteRule ^([^/]+)/about/attachment/([^/]+)/?$ index.php?b=$1&attachment=$2 [QSA,L]
RewriteRule ^([^/]+)/about/attachment/([^/]+)/trackback/?$ index.php?b=$1&attachment=$2&tb=1 [QSA,L]
RewriteRule ^([^/]+)/about/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&attachment=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/about/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&attachment=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&feed=$2 [QSA,L]
RewriteRule ^([^/]+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&feed=$2 [QSA,L]
RewriteRule ^([^/]+)/page/?([0-9]{1,})/?$ index.php?b=$1&paged=$2 [QSA,L]
RewriteRule ^([^/]+)/comments/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&feed=$2&withcomments=1 [QSA,L]
RewriteRule ^([^/]+)/comments/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&feed=$2&withcomments=1 [QSA,L]
RewriteRule ^([^/]+)/comments/page/?([0-9]{1,})/?$ index.php?b=$1&paged=$2 [QSA,L]
RewriteRule ^([^/]+)/search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&s=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/search/(.+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&s=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/search/(.+)/page/?([0-9]{1,})/?$ index.php?b=$1&s=$2&paged=$3 [QSA,L]
RewriteRule ^([^/]+)/search/(.+)/?$ index.php?b=$1&s=$2 [QSA,L]
RewriteRule ^([^/]+)/category/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&category_name=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/category/(.+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&category_name=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/category/(.+)/page/?([0-9]{1,})/?$ index.php?b=$1&category_name=$2&paged=$3 [QSA,L]
RewriteRule ^([^/]+)/category/(.+)/?$ index.php?b=$1&category_name=$2 [QSA,L]
RewriteRule ^([^/]+)/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&author_name=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&author_name=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/author/([^/]+)/page/?([0-9]{1,})/?$ index.php?b=$1&author_name=$2&paged=$3 [QSA,L]
RewriteRule ^([^/]+)/author/([^/]+)/?$ index.php?b=$1&author_name=$2 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&year=$2&monthnum=$3&day=$4&feed=$5 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&year=$2&monthnum=$3&day=$4&feed=$5 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ index.php?b=$1&year=$2&monthnum=$3&day=$4&paged=$5 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ index.php?b=$1&year=$2&monthnum=$3&day=$4 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&year=$2&monthnum=$3&feed=$4 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&year=$2&monthnum=$3&feed=$4 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ index.php?b=$1&year=$2&monthnum=$3&paged=$4 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/([0-9]{1,2})/?$ index.php?b=$1&year=$2&monthnum=$3 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&year=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&year=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/page/?([0-9]{1,})/?$ index.php?b=$1&year=$2&paged=$3 [QSA,L]
RewriteRule ^([^/]+)/date/([0-9]{4})/?$ index.php?b=$1&year=$2 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)-([0-9]+)/trackback/?$ index.php?b=$1&name=$2&p=$3&tb=1 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)-([0-9]+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&name=$2&p=$3&feed=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)-([0-9]+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&name=$2&p=$3&feed=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)-([0-9]+)/page/?([0-9]{1,})/?$ index.php?b=$1&name=$2&p=$3&paged=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)-([0-9]+)(/[0-9]+)?/?$ index.php?b=$1&name=$2&p=$3&page=$4 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/([^/]+)/?$ index.php?b=$1&attachment=$2 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/([^/]+)/trackback/?$ index.php?b=$1&attachment=$2&tb=1 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&attachment=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&attachment=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/attachment/([^/]+)/?$ index.php?b=$1&attachment=$2 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/attachment/([^/]+)/trackback/?$ index.php?b=$1&attachment=$2&tb=1 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&attachment=$2&feed=$3 [QSA,L]
RewriteRule ^([^/]+)/[^/]+-[0-9]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ index.php?b=$1&attachment=$2&feed=$3 [QSA,L]

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d

	RewriteRule ^([^/]+)/? /mikeey09876/lyceum/index.php?b=$1 [L]

# END Lyceum
Personal tools