The MU forums have moved to

Default links not working - mod_rewrite is... (3 posts)

  1. bonchance
    Posted 15 years ago #

    Posting and Comments work, links do not. All the default links for About, Archives and Categories give a 500 server error. Mod_rewrite is functional on site.
    Configured as vhost with MU version downloaded a couple of weeks ago.

    Access Log:
    GET /about/ HTTP/1.1" 500 703

    Error Log:
    mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.

    htaccess file:
    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Test Url that confirms mod_rewrite is functional:

  2. jackiedobson
    Posted 15 years ago #

    You may also want to try increasing the amount of memory assigned to PHP within your php.ini as that has been the cause occasionally as well. The readme file discusses how much memory should be assigned.

    You may have also missed this bit:

    Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.

    There's previous discussion about your error as well and I'm sure over on the regular wp forums. I'd start with checking the php memory and then the other suggestions made previously.

  3. bonchance
    Posted 15 years ago #

    Problem fixed. Issue started with .htaccess version as created during install had Rewrite Base /blog/ I changed to / because I'm doing a subdomain install in site web root and uploaded
    BUT sftp client was having error writing .htaccess file, error window too small so I missed the error as it went by. This morning noticed time stamp on .htaccess file did not change when I upped MaxRedirects=250 for testing. I had already tried setting MaxRedirects=25 earlier, forgot to mention that edit attempted in initial post.

    Confirmed by download of .htaccess that none edits from prior de-bugging efforts existed on server version. Including the critical edit of RewriteBase from /blog/ to / that I needed for subdomain install in web site document root to work.

    I read most of those posts last night, provided something of a process of elimination for this mornings efforts. If the rewrite rules are good and switching Rewrite Base works for them.... hmmm

    Happily putting a couple of sandbox themes up and enjoying new WordpressMU install.

    I appreciate someone taking the time to reply. I have seen the phrase "You may have also missed this bit:" or a variation on it few times in looking for a solution to my problem. It might be a little better to ask a more direct question "Did you try setting MaxRedirects in .htaccess? What did you set it at?" If the person posting has already gone down that route their reply will add to the information available for finding a solution. If they don't know where to set some config, you have told them and anyone else who searches the forum for a solution.

    If on the other hand they spent a few hours late at night reading documentation off the web, trolling the forum, trying different solutions and finally pulled lines from the error and access logs to post for help you don't risk treating the poster like one of those people who don't know what they are doing, won't make any effort and want you to solve the problem for them.

    Think about it, lines from access and error logs, self installed test script to test mod_rewrite. Does it seem a good bet they missed the "bit" in the error logs with the error message?

About this Topic

  • Started 15 years ago by bonchance
  • Latest reply from bonchance