We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3624
    • 7 Posts
    Hi,

    My server was down for most of yesterday. After complaining extensively, it turns out that it was one of my MODx files that was causing the problem.... the .htaccess file. Here is a message back from them:

    We have traced the problem on the server to your domain.com account, something within your .htaccess file (which I have renamed .htaccess.bak) was causing apache processes create by people accessing your site with for example http://www.domain.com/03E6A6DFEF3183F2 as the url to use all of the system CPU and RAM resulting in an unstable system.

    If you have this same code on any other sites please remove it to ensure is no longer casues problems with our service.

    Here are the contents of my .htaccess file:

    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    
    Options -Indexes
    
    # MODx supports friendly URLs via this .htaccess file. In order to use it, you must change the 
    # file name from ht.access to .htaccess. If you don't want to use friendly URLs, you can comment 
    # the three Rewrite directives out with pound signs (like the beginning of this line).
    #
    # Make sure RewriteBase points to the directory where you installed MODx.
    # E.g., "/" if your installation is in your root web documents directory (it comes this way by 
    # default) or "/MODx" if your installation is in a MODx subdirectory, per the comments below. You
    # must serve web pages via Apache with mod_rewrite to be able to use this functionality.
    #
    # The last two blocks of rules at the bottom of this .htaccess file address anamolies with IE 
    # for Windows PCs and the way in which it caches images, which causes a distracting flicker in 
    # background images when links are hovered on the page.
    #
    # The output compression directives immediately below serve to speed up delivery of web pages, 
    # and may also be optionally commented out.
    
    php_flag zlib.output_compression On
    php_value zlib.output_compression_level 5
    
    # Rewrite directives here for SEF (Search Engine Friendly) URLs
    
    Options +FollowSymLinks
    
    RewriteEngine On
    
    #the following sets domain.com to www.domain.com
    RewriteCond %{HTTP_HOST} ^domain\.com
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L]
    
    #add these lines for redirecting visitors, but not FeedBurner agents, to your FeedBurner feed
    RewriteCond %{HTTP_USER_AGENT} !FeedBurner
    RewriteRule ^rss.xml$ http://feeds.feedburner.com/domain [R,L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # If your MODx installation is in a subdirectory, change the following line to match the physical
    # path to the "root" of the site as follows:
    # RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
    
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    
    # This following two sections stops screen flicker in IE on rollovers (Bad IE Win, Bad!).
    # Comment these sections out if you do not need them. They can result in having to force reload
    # pages when developing sites and changing images frequently to see your changes. 
    
    #ExpiresActive On
    #ExpiresByType image/gif A2592000
    #ExpiresByType image/jpeg A2592000
    #ExpiresByType image/png A2592000
    
    #BrowserMatch "MSIE" brokenvary=1
    #BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
    #BrowserMatch "Opera" !brokenvary
    #SetEnvIf brokenvary 1 force-no-vary
    


    Can any one see anything obvious?

    Thanks
      • 33372
      • 1,611 Posts
      Your .htaccess file looks fine to me. I suspect that you have (or had) some other problem and your host just disabled your .htaccess file (eliminating your FURL links), found that stopped the problem from reoccuring, and thus blamed it for causing the problem. Several times I’ve had hosts tell me "something" in my .htaccess file was the source of a problem when in fact .htaccess was just redirecting traffic to the page(s) that were the real problem.

      What version of MODx are you using, and does everything work properly with Friendly URLs disabled? Do you by any chance have the Template Switcher plugin installed on your site (if so, delete it)? Is there anything in your MODx system log or your server’s logs?

      You could try restoring the default .htaccess file for MODx and see if that works properly, but I don’t see any issues with the lines you’ve added at all.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 3624
        • 7 Posts
        Yes, I thought the same, which is why I have now switched hosting providers. Its ruined my weekend because thats all I will be doing now, transferring all the sites.

        I am running the latest version of MODx.

        Thanks