Title: Broke image links when UserDir apache modules enabled
Last modified: August 31, 2016

---

# Broke image links when UserDir apache modules enabled

 *  [ncrypthic](https://wordpress.org/support/users/ncrypthic/)
 * (@ncrypthic)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/broke-image-links-when-userdir-apache-modules-enabled/)
 * Hi,
 * I used your plugin in apache’s UserDir environment, and all my images links are
   broken. After debugging your code, I found that your method of discovering `site_url`(
   eazyest-gallery.php line 486) uses `$_SERVER['DOCUMENT_ROOT']` which totally 
   different on `UserDir` environment. Because by default ‘DOCUMENT_ROOT’ on UserDir
   directory points to Apache’s global `DOCUMENT_ROOT`. To get your plugin works,
   I must set `DocumentRoot` manually on `.htaccess` file.
 * Hope you find a better implementation to discover `site_url` or you can note 
   this on your plugin documentation page.
 * Regards,
    Lim —
 * [https://wordpress.org/plugins/eazyest-gallery/](https://wordpress.org/plugins/eazyest-gallery/)

The topic ‘Broke image links when UserDir apache modules enabled’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eazyest-gallery_969cb1.svg)
 * [Eazyest Gallery](https://wordpress.org/plugins/eazyest-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eazyest-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eazyest-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/eazyest-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eazyest-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eazyest-gallery/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ncrypthic](https://wordpress.org/support/users/ncrypthic/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/broke-image-links-when-userdir-apache-modules-enabled/)
 * Status: not resolved