Solution Timeline

All versions (edits) of solutions to .htaccess, default to full size image if thumbnail does not exist appear below in the order they were created. Comments that appear under revisions were those created when that particular revision was current.

To see the revision history of a single solution (with diffs), click on the solution number (ie. "#1") in the upper right corner of a solution revision below.

← Bounty Expand all edits

Hi,

Depending on your apache version (>2.2 ?), you should add %{DOCUMENT_ROOT} to your condition. Please check https://www.harecoded.com/apache-rewritecond-f-check-file-exists-solution-2246468/ for a demo ans have a try.

Hi,

Depending on your apache version (>2.2 ?), you should add %{DOCUMENT_ROOT} to your condition. Please check https://www.harecoded.com/apache-rewritecond-f-check-file-exists-solution-2246468/ for a demo ans have a try.

EDIT :

Sorry I tried my solution too quickly, "DOCUMENT_ROOT" part is not necessary. I read again your problem, and the issues seems to be a path issue.

As you are in the "thumbs" directory your rewrite rule origin must be an absolute path beginning by "/"

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/wp-content/uploads/vehicles/thumbs/(.*)$ /wp-content/uploads/vehicles/$1 [L]

If this doesn't work, you can try to set this .htaccess on the root folder of the server.

For information, I removed the domain in the destination path as you are on the same server, it is not necessary to specify it.

Since you have placed the .htaccess file inside thumbs folder, so you need to alter the path as I have mentioned below:-

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*$ https://www.rundeautogroup.com/wp-content/uploads/vehicles/$1 [L]

I have already tested the same on my local machine and keeping it in the thumbs folder and its working absolutely fine now. Sometimes, the system gets stuck, so please don't forget to restart apache in your server in that case.

Thanks

Since you have placed the .htaccess file inside thumbs folder, so you need to alter the path as I have mentioned below:-

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*$ https://www.rundeautogroup.com/wp-content/uploads/vehicles/$1 [L]

I have already tested the same on my local machine and keeping it in the thumbs folder and its working absolutely fine now. Sometimes, the system gets stuck, so please don't forget to restart apache in your server in that case.

Thanks

Since you have placed the .htaccess file inside thumbs folder, so you need to alter the path as I have mentioned below:-

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://www.rundeautogroup.com/wp-content/uploads/vehicles/$1 [L]

I have already tested the same on my local machine and keeping it in the thumbs folder and its working absolutely fine now. Sometimes, the system gets stuck, so please don't forget to restart apache in your server in that case.

Thanks

Hello,

probably too late, but try this (note there are no leading slashes):

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^wp-content/uploads/vehicles/thumbs/(.*)$ wp-content/uploads/vehicles/$1 [L]

Your testing service seems to be ok with this.