Title: Re-written Link Incorrect
Last modified: August 21, 2016

---

# Re-written Link Incorrect

 *  [angeliat1](https://wordpress.org/support/users/angeliat1/)
 * (@angeliat1)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/re-written-link-incorrect/)
 * The upload works great to S3.
    The image page that is put into the post is incorrect
   though:
 * [https://s3.amazonaws.com/mybucketname/wp-content/uploads/2014/03/cat5e-crossover-a-to-b.jpg](https://s3.amazonaws.com/mybucketname/wp-content/uploads/2014/03/cat5e-crossover-a-to-b.jpg)–
   does not work
 * [http://mybucketname.s3.amazonaws.com/wp-content/uploads/2014/03/cat5e-crossover-a-to-b.jpg](http://mybucketname.s3.amazonaws.com/wp-content/uploads/2014/03/cat5e-crossover-a-to-b.jpg)–
   works
 * Is there a way to easily fix the script so it passes the bucket name properly?
 * [https://wordpress.org/plugins/amazon-s3-and-cloudfront/](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)

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

 *  Thread Starter [angeliat1](https://wordpress.org/support/users/angeliat1/)
 * (@angeliat1)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/re-written-link-incorrect/#post-4773450)
 * Got part of it.
    Lines 336 & 337: //$domain_bucket = ‘s3.amazonaws.com/’ . $s3object[‘
   bucket’]; $domain_bucket = $s3object[‘bucket’] . ‘.s3.amazonaws.com’;
 * That works perfectly inside the post.
 * However, images are not showing on search or category listing pages.
    Any thoughts?
 *  [jeremyis](https://wordpress.org/support/users/jeremyis/)
 * (@jeremyis)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/re-written-link-incorrect/#post-4773512)
 * I’m also having this issue. Changing the code in classes/amazon-s3-and-cloudfront.
   php as angeliat1 mentioned fixed the issue for me. But, is there a way to get
   it working without modifying plugin code?
 *  [pricklepantz](https://wordpress.org/support/users/pricklepantz/)
 * (@pricklepantz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/re-written-link-incorrect/#post-4773809)
 * I managed to solve this by unticking option Always serve files over https (SSL)
   in the settings without changing plugin code.
    However I can’t replicate angeliat1
   problem.
 * Hope this helps!

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

The topic ‘Re-written Link Incorrect’ is closed to new replies.

 * ![](https://ps.w.org/amazon-s3-and-cloudfront/assets/icon-256x256.jpg?rev=1809890)
 * [WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-s3-and-cloudfront/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/reviews/)

## Tags

 * [bucket](https://wordpress.org/support/topic-tag/bucket/)
 * [link](https://wordpress.org/support/topic-tag/link/)
 * [s3](https://wordpress.org/support/topic-tag/s3/)

 * 3 replies
 * 3 participants
 * Last reply from: [pricklepantz](https://wordpress.org/support/users/pricklepantz/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/re-written-link-incorrect/#post-4773809)
 * Status: not resolved