• My client hosts at XO communications, whose installation tool has an outdated version of WordPress. Seeing the “critical” notice for 3.0.4 I uploaded and updated the files. After the update, index.php was an endless redirect. Admin worked, archive sort of worked.
    This ticket (5017) suggested commenting out the last command in canonical.php. That worked, but now canonical is compromised.

    https://core.trac.www.ads-software.com/ticket/5017
    server makes $_SERVER[‘REQUEST_URI’] ‘/index.php’ for requests to ‘/’ An endless redirect followed, because it was trying to strip that off, but the server was telling it is was still there.
    Perhaps someone can contact XO, to get this resolved. They are charging for their wordpress “help”.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What’s in your .htaccess file?

    And can you share your URL?

    Thread Starter pooka157yahoocom

    (@pooka157yahoocom)

    https://www.marinshakespeare.org/wordpress/index.php

    Index is showing now, but until I commented out that last line in the canonical.php, it wouldn’t resolve. I still have the menu’s set to the archive file.

    the .htaccess file sitting in root has only one line, with a single return after it.

    CGIMapExtension /usr/local/bin/php5 php

    XO’s “help” on r.htaccess isn’t worth much. You can use mod rewrite.but that’s about it. I had been using rewrite, to facilitate a change from html files to php files, but adding the CGIMapExtension command to that file produced a server error for the whole site.

    I needed more than php 4.1, so the CGIMapExtension command took precedence.

    RewriteCond %{HTTP_HOST} ^marinshakespeare.org/pages/$ [NC]
    RewriteRule ^(.*)$ https://www.marinshakespeare.org/pages/$1 [R=301,L]
    RewriteRule ^(index\.htm)$ https://www.marinshakespeare.org/index.php [R]
    RewriteRule ^(index\.html)$ https://www.marinshakespeare.org/index.php [R]

    I hope you are in a position to discuss this with them. They make a habit of “customizing” their code so that it produces errors, which they then volunteer to fix, for a fee.
    https://www.katemorris.com/2010/02/yes-i-hate-xo-communications.html

    I’m not one of the respondents in the link above, but I’ve had to deal with XO’s “custom” .htaccess code solutions, so I understand the sentiments.

    judy

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yeah, not so much with me and XO ?? Don’t even have a clue who they are, and I’m just a volunteer mod here.

    So your .htaccess is this?

    CGIMapExtension /usr/local/bin/php5 php

    That’s not an ABnormal way to call PHP5, just FYI, though any host who still defaults to php4 is behind the times.

    If that change makes it impossible for your rewrites to run, then it’s possible that the behind the scenes work WordPress does to redirect you is also breaking. Though how are you getting Pretty Permalinks to work without the WordPress calls in .htaccess? Did you put a .htaccess file in the wordpress folder?

    Anyway. A fix idea. you can turn off canonical redirection by putting this into your plugins directory :

    <?php
    /*
    Plugin Name: Disable Canonical URL Redirection
    Description: Disables the "Canonical URL Redirect" features of WordPress 2.3 and above.
    Version: 1.0
    Author: Mark Jaquith
    Author URI: https://markjaquith.com/
    */ 
    
    remove_filter('template_redirect', 'redirect_canonical'); 
    
    ?>

    That SHOULD have the same effect as the edit you made to canonical.php

    Thread Starter pooka157yahoocom

    (@pooka157yahoocom)

    No, I haven’t tried doing anything else to get the pretty links. That particular selection works. The last one, custom, doesn’t work.
    I don’t know what made the rewrites break when I added the php 5 command. The server just threw up.

    Disabling core files because the host has non-standard coding isn’t right, but XO makes a point of “customizing” their server code, because that way they can charge to fix things. I’ve updated at least 4 other hosts with those files, and they work fine for most hosting.

    Thanks you for the code. If I totally disable the canonical will the pretty links break as well? I prefer having everything directed to the canonical listing, and using the post names rather than numbers. It’s going backward to take out canonical.

    j

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    No, pretty permalinks are not affected by that code.

    Thread Starter pooka157yahoocom

    (@pooka157yahoocom)

    Thank you.
    Hope this whole exchange benefits the next XO customer whose WordPress update has redirect problems.

    j

    Hi Pooka,

    Here’s a plugin which fixes the permalinks problem on the XO hosting servers. It also disables canonical redirection.

    https://www.ads-software.com/extend/plugins/permalink-fix-disable-canonical-redirects-pack/

    If you use this you can remove the plugin Ipstenu had posted previously.

    Thread Starter pooka157yahoocom

    (@pooka157yahoocom)

    Thank you very much for an XO specific fix. I’ve uploaded it, and put the original canonical.php back. It seems to take care of the redirect issue.

    There are some .htaccess commands in the readme. I tried adding them to the existing .htaccess, but the server responds

    internal error or misconfiguration and was unable to complete your request. Reason: Error parsing access file
    If it is necessary to have those three lines in the .htacess, I’ve still got a problem.

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    That’s not saying there is anything wrong with the lines, only that XO’s server doesn’t like them after the CGIMapExtension /usr/local/bin/php5 php command. But since rewrite commands that had worked for a year wouldn’t work in combination with that command, I don’t know what to do about it, and it’s no good asking XO.
    The XO interface specifically says
    ” .. *Customer Care does not support how to write code using these directives.
    .. * Not all directives are supported by XO? Web Site Hosting. See specific commands listed in this section.”
    and then pitches
    “services of our talented group of technicians who are intimately familiar with our system and can do quick and accurate work to make the best match between your needs and our platform.”

    Thank you for the plug-in. I hope other people who upgrade see it.

    j

    Thread Starter pooka157yahoocom

    (@pooka157yahoocom)

    Below are the tags XO supports. Although the list includes redirect, I don’t know that it actually works. They use mod_rewrite with a touchy format. Their most recent wizard install for Word Press is version 2.2.3.

    “What tags are supported for the XO(R) Web Site Hosting version of the .htaccess file in standard accounts?
    The following tags are supported:
    Note: not all these tags will work with Windows accounts.

    * AddDescription “<description>” <extension> …
    * AddEncoding <encoding> <extension> …
    * AddIcon <file> <extension> …
    * AddIconByEncoding <file> <encoding> …
    * AddIconByType <file> <type> …
    * AddType <type> <extension> …
    * AllowOverride All AuthConfig FileInfo Indexes Limit None Options Redirect
    * AuthGroupFile <file> <optional type>
    * AuthName <name>
    * AuthType <type>
    * AuthUserFile <file> <optional type>
    * CGIMapExtension <directory> <ext> …
    * DefaultIcon <file>
    * DefaultType <type>
    * ErrorPage <file>
    * ForceNoProxy <On | Off>
    * HeaderName <file>
    * IndexIgnore <pattern> …
    * IndexOptions FancyIndexing IconsAreLinks None ScanHTMLTitles
    SuppressLastModified SuppressSize SuppressDescription
    <Limit DELETE GET HEAD OPTIONS POST PUT TRACE>
    Allow from <all | <host> ...>
    Deny from <all | <host> ...>
    OnDeny <file>
    Order <allow,deny | deny,allow | mutual-failure>
    Referer <allow | deny> from <uri> ...
    Require <user | list> ...
    Satisfy <any | all>
    </Limit>
    * Options All ExecCGI FollowSymLinks Includes IncludesCGIOnly

    Note: Customer Care does not support how to write code using these tags, only the fact that our system supports them.
    Which directives of mod_rewrite are not supported?

    * RewriteMap
    * RewriteLog
    * RewriteLogLevel
    * RewriteOptions "

    Thread Starter pooka157yahoocom

    (@pooka157yahoocom)

    I got this to work using a unix text editor (vi). emacs would work, both are native on a mac.
    CGIMapExtension /usr/local/bin/php5 php
    RewriteCond %{HTTP_HOST} ^marinshakespeare.org$ [NC]
    RewriteRule ^(.*)$ https://www.marinshakespeare.org/$1 [R=301,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    As long as this fulfills the plugin readme, Ill consider this solved.

    Thread Starter pooka157yahoocom

    (@pooka157yahoocom)

    After working for a week, the plug-in for the OX communication redirect issue worked, but the Word Press permalinks got lost.

    I’ve been forced to revert to an earlier solution.

    emberstudio

    (@emberstudio)

    Probably a stupid question, but how were you able to get upgraded to PHP5 on XO? I can’t seem to figure out how to even upload a .htaccess file with the phpt line of code in it. I get an access error when trying to upload it to the root.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Endless redirect for wordpress index.php’ is closed to new replies.