Forums

[resolved] Infinite redirect, htaccess issue (9 posts)

  1. exloterum
    Member
    Posted 2 years ago #

    Any help or ideas would be much appreciated

    I ran into this error a few months ago, and just blew it off, avoiding what I wanted to originally do. But now, it's just a complete nuisance to me. Anytime I want to redirect my site's main index page (which is WP) to another WP page within my site, Firefox would tell me "Firefox has detected that the server is redirecting the request for this address in a way that will never complete." Cleared cache, cookies, everything recommended.

    For redirecting, I use cPanel's Redirects, and as far as I can tell, it adds...

    RewriteCond %{HTTP_HOST} ^example.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.example.com$
    RewriteRule ^.*$ "http\:\/\/example\.com\/Word\/\?page_id\=65" [R=301,L]

    to my root htaccess file. Not completely sure what I was doing, I added an htaccess file into the directory the page being redirected to is located, /Word. In it, I added just one line, "ReWriteEngine off". This fixed my "Infinite Loop" bug, but now my site isn't displaying my current theme, or any other theme. The same for the wp-login page, it's not displaying any styles.

    How am I going about this wrong? Any suggestions would be much, much appreciated.

  2. ryans149
    Member
    Posted 2 years ago #

    a question mark in wordpress does not work (or may work, but I dont know). Try changing the permalinks and the set up the redirection..

  3. exloterum
    Member
    Posted 2 years ago #

    As in the question marks in the redirect address? I'll give it a shot, thanks for the advice ryan.

  4. exloterum
    Member
    Posted 2 years ago #

    No luck, just ran into the same infinite loop I mentioned earlier.

  5. ryans149
    Member
    Posted 2 years ago #

    I mean to say, first change the permalink of your blog..

  6. iridiax
    Member
    Posted 2 years ago #

    ... I want to redirect my site's main index page (which is WP) to another WP page within my site...

    I don't think that this is going to work. Try a different method on your home page like using a featured post, a sticky post, or a static front page.

  7. exloterum
    Member
    Posted 2 years ago #

    Ryan,

    changing the permalinks resulted in the infinite loop error again. But before, I used to think this "Redirect Loop" derived from the creation of the redirect. I'm not sure that's exactly the case.

    WP let's me know (after I change permalinks) that "You should update your .htaccess now". I understand this is just a write permissions error, so I manually placed the suggested mod_rewrite rules in my htaccess. This doesn't appear to have changed anything.

    thanks for the suggestion though

  8. songdogtech
    Member
    Posted 2 years ago #

    Try starting over with a clean htaccess to be sure you don't have multiple rewrite rules that are conflicting with each other, and make it as simple as possible. And make sure that the encoding of the htaccess file is the same as your server, i.e., unix for linux, windows for windows, so character encoding isn't throwing junk characters into the file and not allowing it to work.

  9. exloterum
    Member
    Posted 2 years ago #

    iridiax,

    for a moment there I thought "YES, A STATIC PAGE, why didn't I think of that?!", but when I did this, all of my links were broken. Then, I realized I had changed my links to cute urls (which I never use) and changed them back to default, and now all is well! I'm not sure how this got by me in the first place, thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic