• Resolved luz7

    (@luz7)


    Hello

    I have problems with my W3TC configuration. These are the error messages I have:

    W3 Total Cache error:It appears Minify URL rewriting is not working. Please verify that the server configuration allows .htaccess
    Unfortunately minification will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.
    Infos techniques
    
    .htaccess file contains rules to rewrite url https://bluelight.blue/wp-content/cache/minify/984627727w3tc_rewrite_test.css. If handled by plugin, it returns "Minify OK" message.
    The plugin made a request to https://bluelight.blue/wp-content/cache/minify/984627727w3tc_rewrite_test.css but received:
    Array
    (
        [code] => 500
        [message] => Internal Server Error
    )
    
    instead of "Minify OK" response.
    W3 Total Cache error: It appears Page Cache URL rewriting is not working. Please verify that the server configuration allows .htaccess
    Unfortunately disk enhanced page caching will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.
    Infos techniques
    
    .htaccess file contains rules to rewrite url https://bluelight.blue/w3tc_rewrite_test into https://bluelight.blue/?w3tc_rewrite_test which, if handled by plugin, return "OK" message.
    The plugin made a request to https://bluelight.blue/w3tc_rewrite_test but received:
    500 Internal Server Error
    instead of "OK" response.

    Thanks for help.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @luz7

    Thank you for reaching out and I am happy to assist you with this.
    Can you please share if you are using Apache or Nginx or Apache+Nginx?

    Thanks!

    Thread Starter luz7

    (@luz7)

    Hi

    Thanks for the answer. I’m using apache.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @luz7

    Thank you for your feedback.
    Just to confirm, you’ve checked that the rewrite rules in the Performance>Install are the same as in your .htaccess file?
    Have you also checked if the permissions are correct and if the rules are there for /wp-content/cache/page_enhanced/.htaccess and /wp-content/cache/minify/.htaccess?
    Check the .htaccess Permission
    Most cases are caused by file permission of “.htaccess“, find this file at the root of your web directory.
    The recommended permission is 644 – chmod 644 .htaccess
    Check your Apache configuration file – httpd.conf, make sure AllowOverride All is applied to your directory.
    Also, check the sequence of the rules that appear in “.htaccess“, and make sure WordPress’s rule appears AFTER the w3tc rules.

    Please check the content of the wp-content/cache/page_enhanced/ and folder wp-content/cache/minify/. If you see that the pages and minified files are being cached there, you can ignore the error. In some cases, the plugin cannot detect if the rewrite rules work because of server restrictions or similar. The server cannot get a correct response (200 OK) when visiting a certain URL. That doesn’t mean they don’t work, but you have to verify them yourself.

    Thread Starter luz7

    (@luz7)

    Hi

    In /home/uvsu9023/bluelight.blue/.htaccess the following code were missing ( I added now ) :

    # BEGIN W3TC WEBP
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTP_ACCEPT} image/webp
        RewriteCond %{REQUEST_FILENAME} (.+)\.(jpe?g|png|gif)$
        RewriteCond %1\.webp -f
        RewriteCond %{QUERY_STRING} !type=original
        RewriteRule (.+)\.(jpe?g|png|gif)$ $1.webp [NC,T=image/webp,E=webp,L]
    </IfModule>
    <IfModule mod_headers.c>
        <FilesMatch "\.(jpe?g|png|gif)$">
            Header append Vary Accept
        </FilesMatch>
    </IfModule>
    AddType image/webp .webp
    # END W3TC WEBP

    How can I change permissions to 644 in .htaccess ?

    Thanks

    Thread Starter luz7

    (@luz7)

    Hi

    I changed .htaccess permission in 644. I tried to add the following code to my .htaccess because I don’t have access to httpd.conf
    <directory>
    AllowOverride All
    </directory>

    I don’t know how to name the directory. I asked my host O2switch witch directory I should write and he proposed /home/uvsu9023/bluelight.blue or /bluelight.blue but it didn’t work. I don’t think it’s the good directory. I can’t fix the problem.
    Indeed I followed all the other devices. And everything seems to be Ok.

    Do you have an idea of the directory I should write ?

    Thanks for your help.

    Thread Starter luz7

    (@luz7)

    <Directory “/***/***”>
    AllowOverride All
    </Directory>

    Sorry Directory not directory…

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @luz7

    Thank you for your feedback.
    Have you checked that the rewrite rules in the Performance>Install are the same as in your .htaccess file?
    This also includes the rules for /wp-content/cache/page_enhanced/.htaccess and /wp-content/cache/minify/.htaccess?

    Visit the Performance>Install page in the W3 Total Cache plugin. And see if the rules provided there (Once any setting using the .htaccess is enabled the rewrite rules will be provided) match the rules in the mentioned .htaccess files in the /minify/ and /page_enhaced/ folders.

    Thanks!

    Thread Starter luz7

    (@luz7)

    Hello

    Thanks for your feedback.
    Yes the rewrite rules in the Performance>Install are the same that in my .htaccess files ( at the root, /wp-content/cache/page_enhanced/.htaccess and /wp-content/cache/minify/.htaccess ).

    Thanks

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @luz7

    Thank you for your feedback.
    Well, this is very strange. Do you have any files created in the /minify/ and /page_enhaced/ folders?
    Are you by any chance on litespeed server?
    Thanks!

    Thread Starter luz7

    (@luz7)

    Hi

    Thanks for your feedback.
    I finally changed my plugin cache.

    Thanks for your help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Minify and Page Cache URL rewriting is not working’ is closed to new replies.