www.webdeveloper.com
Results 1 to 7 of 7

Thread: Error 500 when using SmartOptimizer

  1. #1
    Join Date
    Jul 2005
    Posts
    601

    Error 500 when using SmartOptimizer

    Hi All

    I have used smartoptimizer on several websites without any difficulties.

    I have recently started work on a new website which is hosted on 1&1 and cannot get it to work.

    I am using v1.8, have made the cache 777.

    I know that mod_rewrite is enabled because my .htaccess file contains some additional lines that are not default in SmartOptimizer.

    If I comment out line below it works

    PHP Code:
    RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$
    Here is my htaccess file. Can anyone help?

    PHP Code:
    <IfModule mod_expires.c>
        <
    FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
            
    ExpiresActive On
            ExpiresDefault 
    "access plus 10 years"
        
    </FilesMatch>
    </
    IfModule>
    <
    IfModule mod_rewrite.c>
        
    RewriteEngine On          
           RewriteCond 
    %{REQUEST_FILENAME} !-f     
        RewriteCond 
    %{REQUEST_FILENAME} !-d     
        RewriteRule 
    ^(.*\.(js|css))$ smartoptimizer/?$1    
        
        
    <IfModule mod_expires.c>
            
    RewriteCond %{REQUEST_FILENAME} -f
            RewriteRule 
    ^(.*\.(js|css|html?|xml|txt|php))$ smartoptimizer/?$1
        
    </IfModule>

        <
    IfModule !mod_expires.c>
            
    RewriteCond %{REQUEST_FILENAME} -f
            RewriteRule 
    ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1
        
    </IfModule>
    </
    IfModule>
    <
    FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
        
    FileETag none
    </FilesMatch>

    <
    IfModule mod_rewrite.c>
        
    RewriteEngine On
        RewriteBase 
    /
        
    RewriteRule ^([^/]*)/([^/]*)\.html$ /index.php?area=$1&dispatch=$[L]
    </
    IfModule

  2. #2
    Join Date
    Jul 2005
    Posts
    601
    bump

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,220
    I don't think it should matter, but you could get rid of the outer parentheses and use $0:
    Code:
    RewriteRule ^.*\.(js|css)$ smartoptimizer/?$0
    Otherwise I have no idea what the problem is. Is there anything of interest in the Apache log files?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Jul 2005
    Posts
    601
    I tried as advised but still the same 500 error.

    I have copied the most recent error from the access logs, not sure if this is the apache logs though as I am on a shared hosting service.

    Code:
    [21/Dec/2010:15:01:58 +0100] "GET / HTTP/1.1" 200 645 new.website.co.uk "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13" "-"

  5. #5
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,220
    Quote Originally Posted by peteyb View Post
    I tried as advised but still the same 500 error.

    I have copied the most recent error from the access logs, not sure if this is the apache logs though as I am on a shared hosting service.

    Code:
    [21/Dec/2010:15:01:58 +0100] "GET / HTTP/1.1" 200 645 new.website.co.uk "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13" "-"
    I think the errors are in a different file than the access log: "apache_error.log" on my PC's installation, but I don't know if all installations use the same name.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  6. #6
    Join Date
    Jul 2005
    Posts
    601
    1&1 do not give access to apache logs.

    I have spoken with technical support who are going to investigate.

  7. #7
    Join Date
    Jul 2005
    Posts
    601
    1&1 are rubbish!

    Reasons not to use 1&1:

    1. Technical support cannot investigate anything sligthly complicated
    2. You cannot use smartoptimzer
    3. You can only access the database via phpMyAdmin
    4. You cannot access the apache logs

    I could think of more but then I would be ranting.

    Unless anyone can suggest something I think I am going to have to move host.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles