wordpress wp-content/uploads folder 301 redirect to S3 bucket by cloudfrond CDN by .htaccess issues

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


wordpress wp-content/uploads folder 301 redirect to S3 bucket by cloudfrond CDN by .htaccess issues



See below, the .htacess file from wordpress. If I remove the part starting from #begin Wordpress. All the image file url will be change to d28rt1vkpsdxas.cloudfront.net/someimage.png successfully.



However, all the internal link will be unable to access(only the home page can access). The error is



Not Found The requested URL /shop/ was not found on this server.



But if I keep the part start from #begin Wordpress. The cdn redirect will not work any more. All photos are missing.



Thanks in advanced.


Options +FollowSymlinks

RewriteEngine on

Rewriterule ^wp-content/uploads/(.*)$ http://exampled28t1vkps.cloudfront.net/$1 [r=301,nc]

# 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









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

S br5vsiDB2EzK8mwGM2UMpvxRIPus1m8Qv8P7uuR12D
VnZ3QAvrJq8NDAy40hpkCUfqBJybzRX,FiQmHmzXr54bWY6jHoDJnb EzkdRC3,QyV,z Y S,WEPfemj NN,ft

Popular posts from this blog

Makefile test if variable is not empty

Visual Studio Code: How to configure includePath for better IntelliSense results

Will Oldham