Title: johnbenedict's Replies | WordPress.org

---

# johnbenedict

  [  ](https://wordpress.org/support/users/johnbenedict/)

 *   [Profile](https://wordpress.org/support/users/johnbenedict/)
 *   [Topics Started](https://wordpress.org/support/users/johnbenedict/topics/)
 *   [Replies Created](https://wordpress.org/support/users/johnbenedict/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/johnbenedict/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/johnbenedict/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/johnbenedict/engagements/)
 *   [Favorites](https://wordpress.org/support/users/johnbenedict/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/johnbenedict/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/johnbenedict/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] Custom Permalink Setup](https://wordpress.org/support/topic/custom-permalink-setup/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/custom-permalink-setup/#post-17201447)
 * Anyone? Any ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/page/2/#post-12962317)
 * Hi [@westonruter](https://wordpress.org/support/users/westonruter/) — finally
   able to look into this for you. No we are not doing any rewriting of `$_SERVER['
   REQUEST_URI']`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/page/2/#post-12945736)
 * I have no idea. I cannot find anywhere in our codebase where this is changed.
 * We are however using `home_url()` quite a bit — and we are always adding that
   trailing slash — so something like this: `home_url( "/something/")`
 * I did just test the output of `home_url( '/' )` — and the trailing slash IS there.
   So it should be working in your function…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/page/2/#post-12945663)
 * Hey [@westonruter](https://wordpress.org/support/users/westonruter/) — after 
   going over this with our developer — we’re not doing anything to `home_url`. 
   No filter, manipulation, etc.
 * In order to fix the issue we were having — we made a simple update to `amp_get_current_url()`:
 * This:
    `$url = preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url( ‘/’ ) );`
 * To this:
    `$url = rtrim(preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url(‘/’)),‘/’).‘/’;`
 * But to keep from breaking the plugin — we actually went this route in `footer.
   php`:
 *     ```
       $html = ob_get_clean();
       $html = preg_replace("!(domain\.com)([a-z0-9])!i", '\1/\2', $html);
       echo $html;
       ```
   
 * I hope this helps. Thank you for being so responsive and willing to help.
    -  This reply was modified 5 years, 11 months ago by [johnbenedict](https://wordpress.org/support/users/johnbenedict/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/page/2/#post-12929454)
 * After talking to our dev — we’re doing a good amount of customization > output
   buffering + link re-writing for our CDN. I probably should have discussed this
   with him first. So not sure it’d be all that helpful.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/#post-12929379)
 * In `amp_get_current_url()` we’ve found a simple change that fixed our issue:
 * Change this:
    `$url = preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url(‘/’));`
 * To this:
    `$url = rtrim(preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url(‘/’)),‘/’).‘/’;`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/#post-12929327)
 * Ok — that is very likely what is happening. I do see some uses of `home_url` 
   doing something like this: `home_url('/something')`
 * I will look into fixing this within our own setup.
 * Thank you so much for you help troubleshooting this.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/#post-12929285)
 * Not sure I want to post all the Site Health info here…
 * WordPress is 5.3.1 (right now)
    AMP Plugin is 1.5.3 and is in Transitional Mode
 * Home URL: [https://www.campsitephotos.com](https://www.campsitephotos.com)
    Site
   URL: [https://www.campsitephotos.com/wp](https://www.campsitephotos.com/wp)
    -  This reply was modified 5 years, 11 months ago by [johnbenedict](https://wordpress.org/support/users/johnbenedict/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/#post-12929257)
 * Yes. Like this in functions.php:
 * `remove_action( 'wp_head', 'wp_generator' ); // remove wordpress version`
    -  This reply was modified 5 years, 11 months ago by [johnbenedict](https://wordpress.org/support/users/johnbenedict/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] amphtml missing a slash after site url](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/amphtml-missing-a-slash-after-site-url/#post-12929201)
 * [https://www.campsitephotos.com/](https://www.campsitephotos.com/)
 * Not using multisite.
 * Install is standard.
 * AMP is active on Blog and Campground Pages right now:
 * [https://www.campsitephotos.com/blog/camping-news/covid-19-campground-reopening-update/](https://www.campsitephotos.com/blog/camping-news/covid-19-campground-reopening-update/)
 * [https://www.campsitephotos.com/campground/ca/doheny-state-beach/](https://www.campsitephotos.com/campground/ca/doheny-state-beach/)
    -  This reply was modified 5 years, 11 months ago by [johnbenedict](https://wordpress.org/support/users/johnbenedict/).
    -  This reply was modified 5 years, 11 months ago by [johnbenedict](https://wordpress.org/support/users/johnbenedict/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] Remove schema markup](https://wordpress.org/support/topic/remove-schema-markup/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/remove-schema-markup/#post-12902854)
 * Thank you [@westonruter](https://wordpress.org/support/users/westonruter/)! I
   really appreciate the fast response.
 * I’ll take the less ergonomic solution for now. Looking forward to the update.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Cannot Edit Galleries Once They Have Been Added](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/#post-2239284)
 * {BUMP}
 * No one with any other ideas?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Cannot Edit Galleries Once They Have Been Added](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/#post-2239186)
 * Ok – setups that work are:
 * mySQL: 5.2.6
    Server API: Apache 2.0 Handler
 * Setup that does not work:
 * mySQL: 5.2.17
    Server API: CGI/FastCGI
 * Not sure what other info would be needed to troubleshoot this?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Cannot Edit Galleries Once They Have Been Added](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/#post-2239178)
 * Glad I’m not alone.
 * I actually have multiple sites that utilize WP Galleries – all on the latest 
   version of WP.
 * All work just fine – except for this one – which is on a different host.
 * I’m wondering if it has something to do with mySQL or a PHP Config specific to
   this host???
 * Trying the .htaccess security fixes I found around Google didn’t help…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Cannot Edit Galleries Once They Have Been Added](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/)
 *  Thread Starter [johnbenedict](https://wordpress.org/support/users/johnbenedict/)
 * (@johnbenedict)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/cannot-edit-galleries-once-they-have-been-added/#post-2239020)
 * Also – I CAN edit Single Photos once they have been added. Something is up with
   Galleries.

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/johnbenedict/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/johnbenedict/replies/page/2/?output_format=md)