Hi Y'all,

I have a recurring redirect issue.  I have had the issue on servers that did not have PHP properly installed. I was able to get help in here to get around that issue. Now I have last Friday setup a new VPS server to make sure it meets all technical requirements for EGG in everyway.


I installed elgg 1.7.1 and proceededto install about 60 plugins and mod that are required to give the site the features the client wants. Now I was able to install all plugins, and all work properly with only 2 or 3 having minor issues that I will fix later today hopefully. Yet once I installed IZAP videos as the last plug in needed for this phase. I had a rewrite issue and had to add code to the htaccess file for izap. Yes I should have before enabling it but forgot.

Once I went  and added the additional code for Izap into the htaccess file and uploaded it I had immediate access to the site again.


The problem is that it seems tha oythers still get one of two errors when trying to access it in IE8 or Chrome 5.0.3, I also have both those on this PC which runs windows 7 and though I can access the site in my FF 3.6.6 - I cannot access it in chrome or ie.

The error messages that are returned are either:

This site is redirecting in a way that will never complete or connect.


This webpage has a redirect loop.  

and yes I did clear all cache, cookies history on our machinesand we stll get the sme error.

 Now whats really funny is my wife is using the same FF as I and is connected to the same internet and while I can access the site she gets an error message saying FF has detected that this site is redirecting in a way that will never connect.


I have gone back ovver all documnetation for the core, the plug ins and the forum where I had been given some advice that worked for a server running php 5.1 whe  it had this issue.

Yet none of these fixes are working for this server.


The server is a Linux VPS running Apache 2.2 PHP 5.2 Mysql 5.1, It has all the proper libraries installed and enabled.  Allsettings are exactl as required php is installed as an apache module etc etc etc.

Yet one or more of the last 5 or 6 plugins I have installed must be creatinga coflict with the rewrite rules etc in the htaccess file.


 So in case i will help I will now C/P the contents of my htaccess file here.============


# Elgg htaccess directives
# Copyright Curverider Ltd 2008-2009
# License http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
# Link http://elgg.org/

<Files "htaccess_dist">
    order allow,deny
    deny from all

# Don't listing directory
Options -Indexes

# Follow symbolic links
Options +FollowSymLinks

# Default handler
DirectoryIndex index.php

# Turn on expiry
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 10 years"

# php 5, apache 1 and 2
<IfModule mod_php5.c>
    # default memory limit to 64Mb
    php_value memory_limit 64M
    # to make sure register global is off
    php_value register_globals 0
    # max post size to 8Mb
    php_value post_max_size 8388608
    # upload size limit to 5Mb   
    php_value upload_max_filesize 5242880
    # hide errors, enable only if debug enabled
    php_value display_errors 0

# Turn on mod_gzip if available
<IfModule mod_gzip.c>
    mod_gzip_on yes
    mod_gzip_dechunk yes
    mod_gzip_keep_workfiles No
    mod_gzip_minimum_file_size 1000
    mod_gzip_maximum_file_size 1000000
    mod_gzip_maximum_inmem_size 1000000
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/javascript$
    mod_gzip_item_include mime ^application/x-javascript$
    # Exclude old browsers and images since IE has trouble with this
    mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
    mod_gzip_item_exclude mime ^image/.*

## Apache2 deflate support if available
## Important note: mod_headers is required for correct functioning across proxies.
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.[0678] no-gzip
    BrowserMatch \bMSIE !no-gzip

<IfModule mod_headers.c>   
    Header append Vary User-Agent env=!dont-vary
    # The following is to disable compression for actions. The reason being is that these
    # may offer direct downloads which (since the initial request comes in as text/html and headers
    # get changed in the script) get double compressed and become unusable when downloaded by IE.
    SetEnvIfNoCase Request_URI action\/* no-gzip dont-vary
    SetEnvIfNoCase Request_URI actions\/* no-gzip dont-vary

# Configure ETags
<FilesMatch "\.(jpg|jpeg|gif|png|mp3|flv|mov|avi|3pg|html|htm|swf)$">
    FileETag MTime Size

<IfModule mod_rewrite.c>

RewriteEngine on

# If Elgg is in a subdirectory on your site, you might need to add a RewriteBase line
# containing the path from your site root to elgg's root. e.g. If your site is
# http://example.com/ and Elgg is in http://example.com/sites/elgg/, you might need
#RewriteBase /sites/elgg/
# here, only without the # in front.
# If you're not running Elgg in a subdirectory on your site, but still getting lots
# of 404 errors beyond the front page, you could instead try:
RewriteBase /

RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ engine/handlers/action_handler.php?action=$1

RewriteRule ^services\/api\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/service_handler.php?handler=$1&request=$2

RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)$ services/export/handler.php?view=$1&guid=$2
RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/$ services/export/handler.php?view=$1&guid=$2
RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/([A-Za-z]+)\/([A-Za-z0-9\_]+)\/$ services/export/handler.php?view=$1&guid=$2&type=$3&idname=$4

RewriteRule ^\_css\/css\.css$ _css/css.php

RewriteRule ^pg\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/pagehandler.php?handler=$1&page=$2%{QUERY_STRING}
RewriteRule ^pg\/([A-Za-z0-9\_\-]+)$ engine/handlers/pagehandler.php?handler=$1%{QUERY_STRING}

RewriteRule xml-rpc.php engine/handlers/xml-rpc_handler.php
RewriteRule mt/mt-xmlrpc.cgi engine/handlers/xml-rpc_handler.php

RewriteRule ^tag/(.+)/?$ engine/handlers/pagehandler.php?handler=search&page=$1

RewriteCond %{THE_REQUEST} !^[A-Z]+\ .*/cpanel
RewriteCond %{THE_REQUEST} !^[A-Z]+\ .*/pwiki
RewriteCond %{THE_REQUEST} !^[A-Z]+\ .*/search
RewriteCond %{THE_REQUEST} !^[A-Z]+\ .*/index.php
RewriteRule ^([A-Za-z0-9\.\_\-\@]+/?)$ pg/link/$1



The last 5 rewrite rules are what izap said to include at the end.



Oh yea I wanted to include a url for a list of all plugins etc installed if you can access it;


  • Take a look at this wiki article - specifically the portion in bold half way done that starts with "Also, use a descriptive title...": http://docs.elgg.org/wiki/My_problem_isn%27t_listed_here

    There is a rewrite log that you can turn on in Apache. This would tell you what rules are being run for a particular URL. Another tool that would help is HTTP Live Headers - an addon for Firefox. It will tell you what URL you are bing redirected to - can help point out the last rewrite that is firing.