Thread Starter
NRNR
(@nuno-recio)
Hello, my friend,
I am so sorry to hear this. If it is not too much trouble could you temporarily enable the plugin and save its settings and send me the part of the htaccess file that it creates, so I can have a look at it and see what might be wrong there?
Cheers,
Takis
Thread Starter
NRNR
(@nuno-recio)
Hi Nevma,
Sure, here it goes
The plugin creates this:
# BEGIN Adaptive Images
#=======================
<IfModule mod_rewrite.c>
RewriteEngine On
# Watched directories
RewriteCond %{REQUEST_URI} /wp-content/uploads [OR]
RewriteCond %{REQUEST_URI} /wp-content/themes
# Redirect images through the adaptive images script
RewriteRule \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php [L]
</IfModule>
# END Adaptive Images
I have already have the following rewrite rules defined (from git hub apache settings):
# ----------------------------------------------------------------------
# | Error prevention |
# ----------------------------------------------------------------------
# Disable the pattern matching based on filenames.
#
# This setting prevents Apache from returning a 404 error as the result
# of a rewrite when the directory with the same name does not exist.
#
# https://httpd.apache.org/docs/current/content-negotiation.html#multiviews
Options -MultiViews
# ----------------------------------------------------------------------
# | Rewrite engine |
# ----------------------------------------------------------------------
# (1) Turn on the rewrite engine (this is necessary in order for
# the <code>RewriteRule</code> directives to work).
#
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine
#
# (2) Enable the <code>FollowSymLinks</code> option if it isn't already.
#
# https://httpd.apache.org/docs/current/mod/core.html#options
#
# (3) If your web host doesn't allow the <code>FollowSymlinks</code> option,
# you need to comment it out or remove it, and then uncomment
# the <code>Options +SymLinksIfOwnerMatch</code> line (4), but be aware
# of the performance impact.
#
# https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
#
# (4) Some cloud hosting services will require you set <code>RewriteBase</code>.
#
# https://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
#
# (5) Depending on how your server is set up, you may also need to
# use the <code>RewriteOptions</code> directive to enable some options for
# the rewrite engine.
#
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions
#
# (6) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the
# appropriate schema automatically (http or https).
<IfModule mod_.c>
# (1)
RewriteEngine On
# (2)
Options +FollowSymlinks
# (3)
# Options +SymLinksIfOwnerMatch
# (4)
RewriteBase /
# (5)
RewriteOptions <options>
# (6)
RewriteCond %{HTTPS} =on
RewriteRule ^ - [env=proto:https]
RewriteCond %{HTTPS} !=on
RewriteRule ^ - [env=proto:http]
</IfModule>
# ----------------------------------------------------------------------
# | Filename-based cache busting |
# ----------------------------------------------------------------------
# If you're not using a build process to manage your filename version
# revving, you might want to consider enabling the following directives
# to route all requests such as <code>/style.12345.css</code> to <code>/style.css</code>.
#
# To understand why this is important and even a better solution than
# using something like <code>*.css?v231</code>, please see:
# http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp|webmanifest)$ $1.$3 [L]
</IfModule>
# ----------------------------------------------------------------------
# | EXISTENTE |
# ----------------------------------------------------------------------
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
So whenever I try to insert the rule to redirect image files to the plugin, it crashes my site.
Have any idea what it could be?
Also after crashing, i have to redefine permalink structure to postname again, because my posts then give me a 404 error
thx
Sorry, for all this trouble. We ‘ll get to the bottom of this! It seems that there might be some combination with your existing htaccess rules that causes the problem.
Please, allow me to put you through one more experiment, if I may!
Could you remove all the other htaccess entries, apart from WordPress core entries, of course, then reactivate the plugin and then save its settings once more? This way we will definitely know if the problem is a bug in the plugin itself or whether the plugin conflictswith some of the other entries you have added in your htaccess file.
Cheers,
Takis
Thread Starter
NRNR
(@nuno-recio)
Hello,
I’ve tried activating the plugin with only the following code on my htaccess (to be able to use permalinks):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
It has resulted in a 500 internal server error
Do you have any ideas of overcoming this?
thx for your support
You are very welcome!
Yes, this was exactly what I meant. So, it seems that the problem has nothing to do with your other htaccess entries. Now, I have to ask if you can spot any entries in your error log files. Does your host allow you access to PHP error log files?
Thread Starter
NRNR
(@nuno-recio)
Hi,
I do not have access to error log files. I’ll create the error log in two days time, because I do not have time now to handle this
talk to you then
thx
Hello, there,
Any news on the issue? Should we close this thread?
Cheers,
Takis
Thread Starter
NRNR
(@nuno-recio)
done, and sorry for the delay 😉
Thank you for the update, my friend!