Page 2 of 3
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 7:12 pm
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.
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 7:23 pm
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]
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 7:43 pm
by tinhat
Its working. godaddy seems to cache the .htaccess for a while.
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 7:44 pm
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
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 7:45 pm
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?
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 7:54 pm
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.
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 7:58 pm
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?
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 8:15 pm
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?
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Thu Jun 05, 2008 8:37 pm
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
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Sat Jun 07, 2008 1:53 am
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
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Sat Jun 07, 2008 2:18 am
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
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Sat Jun 07, 2008 9:05 am
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
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Sat Jun 07, 2008 9:19 am
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.
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Mon Jun 09, 2008 3:13 pm
by JeremyBASS
Hey thanks tinhat... I'll take a look-see... and i'll post back... laters
Re: 500 error mod_rewrite: maximum number of internal redirects reached
Posted: Tue Jun 10, 2008 3:27 pm
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?