Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter miyurusagarage

    (@miyurusagarage)

    Ok I fixed the error in the .htacess file. It was not getting the correct path as you said. I overlooked it earlier. It should have been /home/content/x/x/mysitename/html/wp-content/plugins/add-watermark/cache. It didn’t have of my site subfolder in that url. I think plugin can be fixed to write the correct url in the writeHtAccess method. I’ll submit a PR if you have a repo. Thanks for the guidance all the way to getting it to work.

    Thread Starter miyurusagarage

    (@miyurusagarage)

    ### WATERMARK START
    RewriteEngine On
    RewriteBase /wp-content/uploads/
    RewriteCond /home/content/x/x/html%{REQUEST_URI} -f
    RewriteCond $0 ^/?(.*\.(jpe?g|png))$
    RewriteCond /home/content/x/x/html/wp-content/plugins/add-watermark/cache//%1 -f
    RewriteRule (.*) /wp-content/plugins/add-watermark/cache//$1 [L]
    RewriteCond $0 ^/?(.*\.(jpe?g|png))$
    RewriteCond /home/content/x/x/html/wp-content/plugins/add-watermark/cache//%1.nowm !-f
    RewriteCond $0 !^wpcf7.*
    RewriteRule (.*) ../../wp-admin/admin-ajax.php?action=watermark_image&path=$1 [L]
    ### WATERMARK END
    Thread Starter miyurusagarage

    (@miyurusagarage)

    It’s giving me the error on the php side. I also checked with the debug parameter set to true. Inside the php getCachePath() it returns true and returns the file afterwards. I think that could be why its slowing things down, it goes to the php after failing to grab the file in .htaccess

    Then I inspected the htacess file as well. It’s detecting the base directory correctly (it detects what godaddy mentions on the hosting accout) but still doesn’t return the file straight away. I’m not familiar in .htacess rules. Could you see if there is something wrong here. This is my htaccess file (I redacted the absolute path).

    Thread Starter miyurusagarage

    (@miyurusagarage)

    My replies are not showing up to me…

    Thread Starter miyurusagarage

    (@miyurusagarage)

    It’s giving me the error on the php side. I also checked with the debug parameter set to true. Inside the php getCachePath() it returns true and returns the file afterwards. I think that could be why its slowing things down, it goes to the php after failing to grab the file in .htaccess

    Then I inspected the htacess file as well. It’s detecting the base directory correctly (it detects what godaddy mentions on the hosting accout) but still doesn’t return the file straight away. I’m not familiar in .htacess rules. Could you see if there is something wrong here. This is my htaccess file (I redacted the absolute path).

    ### WATERMARK START
    RewriteEngine On
    RewriteBase /wp-content/uploads/
    RewriteCond /home/content/x/x/html%{REQUEST_URI} -f
    RewriteCond $0 ^/?(.*\.(jpe?g|png))$
    RewriteCond /home/content/x/x/html/wp-content/plugins/add-watermark/cache//%1 -f
    RewriteRule (.*) /wp-content/plugins/add-watermark/cache//$1 [L]
    RewriteCond $0 ^/?(.*\.(jpe?g|png))$
    RewriteCond /home/content/x/x/html/wp-content/plugins/add-watermark/cache//%1.nowm !-f
    RewriteCond $0 !^wpcf7.*
    RewriteRule (.*) ../../wp-admin/admin-ajax.php?action=watermark_image&path=$1 [L]
    ### WATERMARK END
    Thread Starter miyurusagarage

    (@miyurusagarage)

    Hi do you have any idea why its slowing down the site? the htaccess file is there and the cache is there… any chance that caching misses and regenerates it everytime?

    Thread Starter miyurusagarage

    (@miyurusagarage)

    Yes there are files generated there..

Viewing 7 replies - 1 through 7 (of 7 total)