WordPress.org

Ready to get started?Download WordPress

Forums

Endless redirects... (7 posts)

  1. edesilva
    Member
    Posted 7 years ago #

    Managed to get WP sort of installed. Ran into a problem with being unable to login--some endless redirect loop--which was resolved by editing the wp_options database to correct siteurl and home.

    But, there is still a funny issue somewhere else I can't locate. I believe the problem is that my hosting provider (enom.com) sets things up so that my url (desilva.info) actually points a directory underneath my "root" hosting directory. So, for example, I login and get access to a directory called:

    desilvainfo

    The content associated with desilva.info is actually in:

    desilvainfo/info

    So, the file index.html that you get to when typing "www.desilva.info/index.html" is really located in desilvainfo/info/index.html.

    I installed WordPress to:

    desilva/info/wordpress

    That works, and you can get there typing:

    http://www.desilva.info/wordpress.

    When I edited the wp_options database, I had to correct the siteurl and home, which were both showing:

    http://www.desilva.info/desilvainfo/info/wordpress...

    and get rid of the extra "desilvainfo/info." That got things basically working--it stopped an infinite redirect loop after login. But, when I perform certain functions, e.g., changing options in the admin panel, I still get into the occasional redirect loop, and it looks like the same problem--there is an extra desilvainfo/info/ in the url.

    Any idea how to fix this? I checked the wp_options database, and it stayed fixed. The urls there are right. I ran searches in the forums and faqs, but didn't turn up anything useful--I'm probably just too newbie to figure out the right search terms, 'cos I either get a slew of useless stuff or nothing...

    Anyone know what is going on?

  2. edesilva
    Member
    Posted 7 years ago #

    I've snagged the two urls its flipping between when its in its infinite loop... It goes from:

    http://www.desilva.info/wordpress/wp-login.php?redirect_to=%2Fdesilvainfo%2Finfo%2Fwordpress%2Fwp-admin%2Foptions-writing.php%3Fupdated%3Dtrue

    and

    http://www.desilva.info/desilvainfo/info/wordpress/wp-admin/options-writing.php?updated=true

    Just keeps going back and forth... gotta believe there is a bit of code somewhere that is responsible for the extra desilvainfo/info/, but I can't seem to find it...

    Tried changing the line in wp_options.php from:

    define('ABSPATH', dirname(__FILE__).'/');

    to:

    define('ABSPATH', './');

    But that blew everything up. *sigh*

  3. moshu
    Member
    Posted 7 years ago #

    Never seen something like that. If you think it's a host issue... run away :)

  4. edesilva
    Member
    Posted 7 years ago #

    Actually, I don't think its a host issue--I never typed "desilvinfo/info" into anything. I suspect somewhere WP is using some function to get the server directory, which is returning "desilvainfo/info," even though that is invisible to the end user and shouldn't be included in the WP references either...

    Argh.

  5. edesilva
    Member
    Posted 7 years ago #

    OK, two sides to every coin, perhaps you can call it a host problem when the server returns the current directory as "desilvainfo/info/wordpress" instead of "wordpress." But, I can't tweak the host, only WP. Anyone have any idea where I'd start looking for the php code causing the problem? I know very little about php...

  6. Chris_K
    Member
    Posted 7 years ago #

    I can't even understand the problem, so I probably won't be offering advice on what to hack.

    Options -> General, what do you have for the two URI values?

  7. edesilva
    Member
    Posted 7 years ago #

    Both are set to: http://www.desilva.info/wordpress

    I think I manually set those in wp_options based on reading one of the support docs, if those two URIs are "siteurl" and "home" in that database.

    I'll try to summarize the problem. The blog *mostly* works. However, there are certain instances--such as setting options--where the php code generates a redirect to something that looks like:

    http://www.desilva.info/desilvainfo/info/wordpress/whatever.php

    This doesn't exist, and should be:

    http://www.desilva.info/wordpress/whatever.php

    For some reason, this is causing some sort of looping, and it goes back to the calling php routine, which just tries again with the same url.

    The problem (I think) is that the host's directory associated with "www.desilva.info/wordpress" is "/desilvainfo/info/wordpress"--in other words, the "/desilvainfo/info" shouldn't be in the redirect.

    But, I didn't type those values in anywhere, so wordpress is (I'm guessing) doing some kind of call to get the current working directory (which my host is presumably returning as "/desilvainfo/info/wordpress"). I think I need to hardwire "/wordpress" into where that is happening to get things working right.

    In the two URLs I showed in a prior post, wp_login.php is doing a redirect to wp_admin/option-writing.php in the wrong place, for example, but I can't even find where wp_login.php references option-writing.php at all... (The loop shown was caused when I changed an option and tried to save changes in the control panel...

Topic Closed

This topic has been closed to new replies.

About this Topic