Elgg Installation

Hi, I'm unable to install elgg on openlitespeed. I put rewrite code from .htaccess file to openlitespeed rewrite rules and enable it but still fail rewrite check of elgg. I skip that step and install elgg but now getting 404 error page. I have attached elgg htaccess file. Please help what exactly I should copy to openlitespeed virtual host rewrite rules.


Last edited:


Active Member
Howdy Faizan,

Check the mod_rewrite documentation: http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule

Rewrite rules behave differently in .htaccess files and in virtual host configurations:

"In VirtualHost context, The Pattern will initially be matched against the part of the URL after the hostname and port, and before the query string (e.g. "/app1/index.html").
In Directory and htaccess context, the Pattern will initially be matched against the filesystem path, after removing the prefix that led the server to the current RewriteRule (e.g. "app1/index.html" or "index.html" depending on where the directives are defined)."

This means you have to the whole URI when you're defining locations — at least a "/" before things like "engine/handlers/page_handler.php?handler=$1" and maybe more if there's more to the URI that's been assumed by the .htaccess file.

Let me know if that doesn't make sense.

I added / to all rewrite rules like this
RewriteRule ^rewrite.php$ /install.php [L]
but it did not work. Then I added / like this
RewriteRule ^/rewrite.php$ install.php [L]
and it worked.