500 error mod_rewrite: maximum number of internal redirects reached [solved]

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
User avatar
tinhat
Forum Members
Forum Members
Posts: 65
Joined: Fri May 23, 2008 6:33 am

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by tinhat »

Try:

RewriteCond %{HTTP_HOST} huntereducation\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /HunterEducation

Let me know how you go because I'm going to bed soon.
JeremyBASS

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by JeremyBASS »

I'm confused now still getting a 400 bad request... I hope we can get this before your off... i'm getting into dier strights with time lol...

sorry forgot code

Code: Select all

RewriteCond %{HTTP_HOST} huntereducation\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /HunterEducation

# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
User avatar
tinhat
Forum Members
Forum Members
Posts: 65
Joined: Fri May 23, 2008 6:33 am

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by tinhat »

Its working. godaddy seems to cache the .htaccess for a while.
JeremyBASS

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by JeremyBASS »

ok so i figured out the 400 error...

Code: Select all

RewriteCond %{HTTP_HOST} huntereducation\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /HunterEducation

# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

should have been like this

Code: Select all

# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
RewriteCond %{HTTP_HOST} huntereducation\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /HunterEducation
and so i do get  http://www.dwproductions.com/HunterEducation as http://www.huntereducation.com

But i don't get  http://dwproductions.com/huntereducation/test/ would be http://www.huntereducation.com/test/

I know it's really close now
JeremyBASS

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by JeremyBASS »

Its working. godaddy seems to cache the .htaccess for a while.
no i changed it... the .htaccess seems to be instant for what it's worth....
still ... any ideas?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by calguy1000 »

This is past the scope of an issue 'related specifically to CMS Made simple'... you may be best asking in some other forum or IRC channel.

Either way, I'm gonna move this topic.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
tinhat
Forum Members
Forum Members
Posts: 65
Joined: Fri May 23, 2008 6:33 am

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by tinhat »

Well http://www.huntereducation.com is now pointing to the correct site. The problem with the other pages is that the links generated by CMSMS give the full URL including the domain dwproductions.com That is another problem.

I actually don't know CMSMS that well - I am testing it at the moment on a dev server. You will need someone to tell you how you can configure it or your template to change the domain in the anchors (links).

My best advice would be to tell the client to just get another hosting account. They are only a few bucks a month at godaddy. Is  this trouble really worth the time?
Last edited by tinhat on Thu Jun 05, 2008 8:01 pm, edited 1 time in total.
JeremyBASS

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by JeremyBASS »

My best advice would be to tell the client to just get another hosting account.
that was discussed, but it was decided *not be me* to work this out as all most all of our clients go through them as it's cheap so it's worth the time to fix it for the other that have issues like this *at some later point with them*


so...
problem with the other pages is that the links generated by CMSMS give the full URL including the domain dwproductions.com
could it not be rewritten so that all uri
http://dwproductions.com/huntereducation/*
=
http://www.huntereducation.com/*

then it would only be a hierarchical issues as far as the rest went?
JeremyBASS

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by JeremyBASS »

@ calguy1000 .. true.. it has move alittle past... when done I'll condese this down and post the result under tips and trick as "mulitable domains under one CMSMS setup"... laters
Last edited by JeremyBASS on Thu Jun 05, 2008 9:04 pm, edited 1 time in total.
baki250
Forum Members
Forum Members
Posts: 22
Joined: Wed Feb 06, 2008 12:27 am

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by baki250 »

Thanks for this help guys, but i followed all the guides in this form and none of which is working. everytime i click on an area it refreshes the page but still stays on the Home page. No changes. And the url changes to the pagename but not the actual content. Im using MLE. Can anyone help me as to what im missing: here is my code:

Code: Select all

# BEGIN Optional settings

# Turns off directory browsing
# not absolutely essential, but keeps people from snooping around without
# needing empty index.html files everywhere
Options -Indexes

# Deny access to config.php
# This can be useful if php ever breaks or dies
# Use with caution, this may break other functions of CMSms that use a config.php
# file.  This may also break other programs you have running under your CMSms
# install that use config.php.  You may need to add another .htaccess file to those
# directories to specifically allow config.php.
<Files "config.php">
order allow,deny
deny from all
</Files>

# Sets your 403 error document
# not absolutely essential to have,
# or you may already have error pages defined elsewhere
ErrorDocument 403 /forbidden403.shtml

# No sense advertising what we are running
ServerSignature Off

# END Optional Settings

# BEGIN CMSMS and Rewrite Rules
# Make sure you have Options FollowSymLinks
# and Allow on

RewriteEngine On

# Might be needed in a subdirectory
RewriteBase /

# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]
#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]
#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]
#OR if the URI contains a "<__script__>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#OR script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#OR any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^.*$ - [F,L]
# END Filtering

RewriteCond %{HTTP_HOST} bigred23\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /

# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

# END CMSMS

# END Rewrite rules
and here is my config file:

Code: Select all

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;
I tried and read so many forums but couldnt get anywhere. Any little help will really be appritiated.

Many Many Thanks in advance
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by Nullig »

I believe your final rewrite rule should be:

RewriteRule ^(.+).html$ index.php?page=$1 [QSA]

instead of

RewriteRule ^(.+)$ index.php?page=$1 [QSA]

Nullig
User avatar
tinhat
Forum Members
Forum Members
Posts: 65
Joined: Fri May 23, 2008 6:33 am

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by tinhat »

You have:

Code: Select all

RewriteCond %{HTTP_HOST} bigred23\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /
This does nothing. It is saying:
If the http_host header is for bigred23.com
And, if the request_uri header is for the root directory
Then, match all characters in the URL and replace them with "/" (which is the URL for the root directory).

Maybe you mean

Code: Select all

RewriteRule .* /somewhere-else/
User avatar
tinhat
Forum Members
Forum Members
Posts: 65
Joined: Fri May 23, 2008 6:33 am

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by tinhat »

JeremyBASS wrote:
My best advice would be to tell the client to just get another hosting account.
that was discussed, but it was decided *not be me* to work this out as all most all of our clients go through them as it's cheap so it's worth the time to fix it for the other that have issues like this *at some later point with them*


so...
problem with the other pages is that the links generated by CMSMS give the full URL including the domain dwproductions.com
could it not be rewritten so that all uri
http://dwproductions.com/huntereducation/*
=
http://www.huntereducation.com/*

then it would only be a hierarchical issues as far as the rest went?
Well, no-one else has suggested anything so I took a look at config.php
In there will be a line (around line 41) that looks something like:

$config['root_url'] = 'http://www.dwproductions.com';

Replace that with:

$config['root_url'] = 'http://' . $_SERVER['HTTP_HOST'];

Use at own risk.
JeremyBASS

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by JeremyBASS »

Hey thanks tinhat... I'll take a look-see... and i'll post back... laters
JeremyBASS

Re: 500 error mod_rewrite: maximum number of internal redirects reached

Post by JeremyBASS »

so that did the trick...

$config['root_url'] = 'http://' . $_SERVER['HTTP_HOST'];

worked just as i wanted... but why the "Use at own risk."  Is there something i need to know about doing that?
Post Reply

Return to “The Lounge”