Support » Fixing WordPress » Tried to amend htaccess to improve site speed

  • I was trying to speed up my site’s loading time and I added the following code at the end of my htaccess file:

    <IfModule mod_expires.c>
    # Enable expirations
    ExpiresActive On
    # Default directive
    ExpiresDefault “access plus 1 month”
    # My favicon
    ExpiresByType image/x-icon “access plus 1 year”
    # Images
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType image/jpg “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    # CSS
    ExpiresByType text/css “access 1 month”
    # Javascript
    ExpiresByType application/javascript “access plus 1 year”

    The problem is, when I tried opening the site, afterwards, this is what I got (and still get, despite clearing the cache:

    Warning: require(/home2/walid352/public_html/ [function.require]: failed to open stream: No such file or directory in /home2/walid352/public_html/ on line 21

    Fatal error: require() [function.require]: Failed opening required ‘/home2/walid352/public_html/’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home2/walid352/public_html/ on line 21

    I don’t know how to fix it. Should I scrap the site, buy a new domain and start again?

    Thanks, in advance, for any help…

  • The topic ‘Tried to amend htaccess to improve site speed’ is closed to new replies.