The MU forums have moved to WordPress.org

The page isn't redirecting properly (With Godaddy) (13 posts)

  1. Raymeo
    Member
    Posted 14 years ago #

    The weirdest thing happened to me last night.

    I have wpmu installed into my root directory, and last night my site was up and running, working perfectly. However my "main blog" I don't use, for uniformity's sake, preferring instead to have all blogs on sub-domains. Since this was my preference, I had built a custom home page and wanted users to be redirected to it whenever they were directed to the main blog's index.php. So I hopped onto Godaddy's site, logged into my hosting account, and visited the Site Redirects page. When I got to this page it was my first time ever checking it out, but there were already two redirects set up.

    First one...
    Redirect From: This is left blank.
    WWW prefix: Only with
    Redirect To: ^([_0-9a-zA-Z-]+/)?(.*.php)$
    Type: Temporary (302)
    Contents: Root redirect

    Second one...
    Redirect From: This is left blank.
    WWW prefix: Only with
    Redirect To: ^([_0-9a-zA-Z-]+/)?(wp-.*)
    Type: Temporary (302)
    Contents: Root redirect

    Like I said, I'd never used Godaddy's Site Redirects page before, so I assume that these were automatically set up by my wpmu install. Anyway, I went ahead and added my redirect...

    Redirect From: beingray.net/index.php
    WWW prefix: With or Without
    Redirect To: http://beingray.net/home.html
    Type: Permanent (301)

    After adding this redirect, I went to test it by trying to visit http://beingray.net/index.php. That's when I started getting this error...

    The page isn't redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    The URL made visible in my broswer was:

    http://beingray.net/^([_0-9a-zA-Z-]+/)?(wp-.*)

    So naturally, I immediately went back and deleted that new redirect that I had just added. I figured that by deleting the redirect, I'd essentially be hitting the undo button because that redirect was the only thing I'd altered since my site was working. However, after deleting that one redirect, the problem persists.

    Because the URL seems to indicate that the two other redirects may be involved, I tried deleting them to see if anything would happen. However, whenever I delete/change them via the Godaddy Site Redirects page, they instantly revert to being there in there original state again. There's no touching them.

    I tried e-mailing Godaddy about this, claiming that my website was working fine until I used their tool. After all, as far as I can tell, deleting the redirect that I had put into effect should have put things right back how they were, and it didn't. The problem didn't exist before I used their tool. However, the reply that I got from Godaddy states...

    It appears you are attempting to utilize some sort of redirect, or mod_rewrite, but they have not been implimented properly. Unfortunately, we are very limited in the support we can offer for customer-written/third-party code or scripts such as this. If there is evidence that our system is responsible for the error, please forward it to us, and we would be happy to look into the matter further. But at the moment this does not yet appear to be the case, so we regret we can not currently assist you with this issue. We apologize for any inconvenience this may cause.

    So I turn to you, trusty wpmu forum friends. Any idea what may be the issue here?

    Some more details I can think of off the top of my head...

    - Using Godaddy's Linux hosting
    - They appear to have my hosting account running Apache 1.3
    - Site URL is beingray.net, with wpmu in the root directory
    - The error is crippling the entire domain. Even trying to access .jpg files that are in folders unrelated to wpmu results in this error.
    - I may be a noob, but as far as I can tell my wp-config file looks ok.
    - I'd post the contents of my .htaccess file because it appears to be relevant to this issue, but I saw a dude get virtually slapped for doing it in another thread on here somewhere, and he ended up just being pointed to the wpmu debugging page to essentially think about the wrong that he had done haha. The page basically said at one point, "don't post the contents of your .htaccess file -- we have it too, so you'll just be wasting our time." If you need to see it though, just let me know.
    - I'd post links to text versions of my files, but... that's not going to work because this error would prevent you from accessing them. I would post them directly here on the forum if the debug page hadn't said that it was discouraged due to the potential of code being stripped. If you need to see something and you can think of an alternative way for me to get them online other than through my site, please let me know how, and let me know which files to make available. I'll be more than happy to do whatever it takes to get the assistance that you guys have to offer. :)

    Thanks for taking the time to read this, and thanks s'more if you take the time to reply!

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Don't use the redirect, you'll muck up the entire install. The main index.php is used by the entire installation.

    If you want the main page to show whatever you made in the http://beingray.net/home.html page, then you have to make the changes in that page part of the theme that is set on the main blog.

    Basically, rename that to home.php, stuff it in the theme directory for the one on the main blog and you're good.

    (and we only need to see your htaccess file if you made any changes. ;) )

  3. Raymeo
    Member
    Posted 14 years ago #

    I deleted that redirect though, so I'm not using it anymore.

    All that's left are the two that wpmu appears to have created on its own.

    First one...
    Redirect From: This is left blank.
    WWW prefix: Only with
    Redirect To: ^([_0-9a-zA-Z-]+/)?(.*.php)$
    Type: Temporary (302)
    Contents: Root redirect

    Second one...
    Redirect From: This is left blank.
    WWW prefix: Only with
    Redirect To: ^([_0-9a-zA-Z-]+/)?(wp-.*)
    Type: Temporary (302)
    Contents: Root redirect

    And yet, even though I deleted that redirect that I shouldn't have created, leaving only the wpmu-created ones, I still keep getting redirected to...

    http://beingray.net/^([_0-9a-zA-Z-]+/)?(wp-.*)

  4. Raymeo
    Member
    Posted 14 years ago #

    Update:

    Experimented with deleting my .htaccess file. After deleting it, I was able to view my various files such as .jpg and .swf again. I was even able to view the index pages to my blogs. However, when trying to go anywhere deeper in the blogs -- archives, log in, view single post, or anything else but the index -- I got 404 not found errors.

    Don't know if this additional info helps or not, but figured I'd mention it just in case.

    Update #2:

    If I delete just the following two lines from my .htaccess file...

    rewriterule ^ "^([_0-9a-zA-Z-]+\/)?(wp-\.*)" [R=302,L] #[L]
    rewriterule ^ "^([_0-9a-zA-Z-]+\/)?(\.*\.php)$" [R=302,L] #[L]

    ...then it looks like everything works. I haven't extensively tested, but they seem normal at first glance. I'm sure that this isn't the preferred method of fixing this though, as I'm sure there are plenty of problems that it will cause which are simply going unseen by my lack of experience...

  5. andrea_r
    Moderator
    Posted 14 years ago #

    Those two lines actually look like non-default, godaddy added ones, so.. you may be good.

  6. Raymeo
    Member
    Posted 14 years ago #

    Sweet. That makes me happy. :D

    Do you have a copy of the file in its default state that I can compare mine to, to see if mine has anything else that's fishy? And what should the permissions on the file be -- I forgot to make a note that part.

  7. tmoorewp
    Member
    Posted 14 years ago #

    You should have an htaccess.dist that is the default WordPressMU .htaccess. Check that.

  8. Raymeo
    Member
    Posted 14 years ago #

    Yay! I've got everything fixed now. Thanks everybody for your help! I couldn't have done it without you! And my wpmu is 99% configured to my liking at this point. I'm so close to done that I can taste it!

    Yet... before I let you all ride quietly off into the sunset, I just have two final questions. Nowhere near as headache-inducing as my others, I promise!

    1.) What should the permissions be for the .htaccess file?
    2.) I've created a user that I would like to give full admin abilities to, like a second default "admin" account, including access to the Site Admin panel on their dashboard. I can't seem to figure out how to do that though. I've set them as Administrator role on all blogs, and added their name to the Site Admins list in Site Options, but that doesn't seem to have done the trick. Where am I not looking?

  9. tmoorewp
    Member
    Posted 14 years ago #

    1. The file needs at least 644 (readable by the server, writeable by you).

    2. When you put the person's username in the Site Options panel, only separate it from the "admin" by using a space. Any other characters may mess up how WordPress reads that field.

  10. Raymeo
    Member
    Posted 14 years ago #

    Aha! That got me thinking and I realized that I typed the first letter in the second username as capitalized. Wordpress didn't like that. Thanks!

    Alright, partners. Thank you sooo much for everything! I appreciate your help sooo much! Take care! :)

  11. bobthemonster
    Member
    Posted 14 years ago #

    I am having a very closely related problem!

    my .htaccess had:
    rewriterule ^ "^([_0-9a-zA-Z-]+\/)?(wp-\.*)" [R=302,L] #[L]
    rewriterule ^ "^([_0-9a-zA-Z-]+\/)?(\.*\.php)$" [R=302,L] #[L]

    in it, and was giving me the infinite redirect loop!

    So I took them out, and it fixes the main page of my blog site (no more redirect error). BUT the problem is now none of my individual blog sites are loading their style sheets, The content is there, but completely unstyled.

    http://www.surferscandy.com is styled correctly BUT
    http://www.surferscandy.com/trevormoran isn't

    My .htaccess:

    rewriteengine on

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteBase /
    AddDefaultCharset UTF-8
    </IfModule>
    # END WPSuperCache
    # BEGIN supercache
    <IfModule mod_mime.c>
    AddEncoding gzip .gz
    AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
    SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>
    <IfModule mod_headers.c>
    Header set Cache-Control 'max-age=300, must-revalidate'
    </IfModule>
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html A300
    </IfModule>
    # END supercache
    RewriteBase /
    #uploaded files
    # add a trailing slash to /wp-admin
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>
    rewritecond %{REQUEST_URI} !^.*[^/]$
    rewritecond %{REQUEST_URI} !^.*//.*$
    rewritecond %{REQUEST_METHOD} !=POST
    rewritecond %{QUERY_STRING} !.*=.*
    rewritecond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    rewritecond %{HTTP:Accept-Encoding} gzip
    rewritecond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    rewriterule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    rewritecond %{REQUEST_URI} !^.*[^/]$
    rewritecond %{REQUEST_URI} !^.*//.*$
    rewritecond %{REQUEST_METHOD} !=POST
    rewritecond %{QUERY_STRING} !.*=.*
    rewritecond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    rewritecond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    rewriterule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    rewriterule ^(.*/)?files/$ index.php [L]
    rewritecond %{REQUEST_URI} !.*wp-content/plugins.*
    rewriterule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    rewritecond %{REQUEST_URI} ^.*/wp-admin$
    rewriterule ^(.+)$ $1/ [R=301,L]
    rewritecond %{REQUEST_FILENAME} -f [OR]
    rewritecond %{REQUEST_FILENAME} -d
    rewriterule . - [L]
    rewriterule . index.php [L]

    Halp!

  12. bobthemonster
    Member
    Posted 14 years ago #

    Bump, halp!

  13. bobthemonster
    Member
    Posted 14 years ago #

    You will also now see a Forbidden if you goto the domain. Let me know if you need this to resolve for problem solving, I'll get rid of the rule.

About this Topic

  • Started 14 years ago by Raymeo
  • Latest reply from bobthemonster