[TYPO3] .htaccess & SimulateStaticDocuments creates infinite redirection loops

Watkins: Seasons For Success lynne at seasonsforsuccess.com
Tue Jun 13 19:30:44 CEST 2006


Here's my problem in a nutshell: The standard Typo3 .htaccess file is
suddenly causing a redirection loop with my Typo3 root page. The root page
redirects itself to itself to itself, etc....until it eventually times
itself out from exhaustion. ;-) If I disable the .htaccess file, the main
page loads and everything *looks* fine, even the link paths. But all the
links (those pointing to Typo3 pages) just get redirected back to the root
page. If I disable SimulateStaticDocuments, the resulting links work fine.
If I leave SimulateStaticDocuments enabled and just add the line,
"config.simulateStaticDocuments = PATH_INFO", the links also work fine. But
I *really really like* the .html links created by SSD instead and would like
them back!

Here's a bit of history that hopefully is useful: Back in November I moved
my site, http://seasonsforsuccess.com/index/, to a new server with my same
webhost. I imported my content from version 3.5 into 3.8.1. I enabled SSD by
first renaming the included _.htaccess file to .htaccess. I enabled the SSD
option in the Install Tool. I put the following code into my Setup:

-----snip-----
#Simulate Static Document
config {
  simulateStaticDocuments = 1
  simulateStaticDocuments_addTitle = 30
  simulateStaticDocuments_noTypeIfNoTitle = 1
  simulateStaticDocuments_pEnc=md5
  include the GET parameters from tt_news to the encoded vars (all in one
line)
  simulateStaticDocuments_pEnc_onlyP = cHash, L, print, tx_ttnews[backPid],
tx_ttnews[tt_news], tx_ttnews[pS], tx_ttnews[pL], tx_ttnews[arc],
tx_ttnews[cat], x_ttnews[pointer], tx_ttnews[swords], tx_ttnews[day],
tx_ttnews[month], tx_ttnews[year]
}
---end snip---

All ran smoothly until last week. Sometime around June 9th, the main page
stopped loading. I've had intermittant problems with down time, but on those
occasions I usually either couldn't access my webhost's File Manager or log
into the MYSQL database (via phpMyAdmin), so I knew my webhost's server was
down, not just my site.

However, this time I could log into everything except Typo3. I then
discovered anything on my site that wasn't under the Index directory (which
is the root directory for Typo3) loaded just fine. But anything under Index
(even direct paths to .jpg files) wouldn't load. While I was poking around
in my webhost's File Manager to ferret out the problem file, something
really screwy happened and all of my files under Index suddenly changed
permissions from me to root. Just prior to that I had renamed the .htaccess
file to see if that was the cause of my page not loading; it didn't appear
to have any effect, so I named it back to .htaccess. Then suddenly I wasn't
allowed to edit any files and http://seasonsforsuccess.com/index/ was
loading as a 403 Forbidden error. In addition, every time I clicked on a
subdirectory under Index (like fileadmin), my webhost's File Manager
redirected me to its root directory (which is two directories back from
Index.)

I got my webhost to reset the permissions which got rid of the 403 error
(and File Manager's own redirection), but they informed me that an
"improperly configured .htaccess file" was causing a redirection loop on my
website. I now believe the redirection loop was the initial problem and I
just didn't catch it. The fact that my webhost's File Manager changed all my
permissions under Index and started having its own problem with redirection
after I messed with the .htaccess file may or may not be relevant.

Anyway, I have replaced the .htaccess file with a "clean" copy from the
dummy package. I have replaced index.php and all files in the tslib
directory.

I have added the line "RewriteRule ^[^/]*\.html$ index.php" to the .htaccess
file. I have commented out various RewriteRules. Nothing works; as long as
*any* line of code is enabled in the .htaccess file, it sends my root page
into the infinite redirection loop. And without the line
"config.simulateStaticDocuments = PATH_INFO" added into setup (or SSD
disabled altogether), my links just redirect back to the root page.

My webhost techs claim they're not having any issues with Apache.

I considered trying RealURL, but it's my understanding it also requires the
.htaccess file. I hate to reinstall Typo3 altogether; it's a lot of work for
such a relatively small headache and it's no guarantee of a cure.

There you have it. I am not a programmer, don't know PHP, couldn't write a
line of Typscript to save my life, but I've muddled through installing and
using Typo3 pretty well, I think. I'm so grateful to this list; I've been
able to apply working solutions to all my Typo3 problems over the past few
years. I'm sure someone here has useful suggestions for me now!

--Lynne Mickley




More information about the TYPO3-english mailing list