htaccess change puts double slashses (//) in URL after creating subdomain for images

  • Answered

I recently read about the benefits of creating a subdomain to serve up images for WordPress blogs.

It would have been better to do this before making blog posts, but I followed the instructions in this article:

The problem is I'm now seeing double slashes when I'm looking at an image's direct URL path. Here's an example blog post:

The direct URL path for the pizza picture has two (//) slashes:

It doesn't appear that desktop Chrome browser minds the double slashes; it still loads and renders the images.

How do I eliminate the (//) slashes?
Hello StandardToaster, Sorry for the issues you're having with the path. There are a few possible causes to the problem. One possibility appears is your use of multisites in WordPress. According to the WordPress Codex, you would need to manually review your paths in the database: Multisite notes If you are not using the WordPress installation as a multisite, then you may want to consider removing the option. Another post hinted that it may be caused by a plugin (the plugin author acknowledged the problem). In either case you may want to double-check the paths in the database by looking at it manually. You can use phpMyAdmin to edit the database as necessary. I did try disabling and re-enabling the permalinks to see if it would have an effect, but so far it's not affecting it. I also tried turning OFF the .htaccess rule that you have added. This gets rid of the double-slash, but also removes your custom re-written path. The extra slash is coming from WordPress when it's generating the automatic path (based on the permalink) in combination with the .htaccess rule. Both are working the way they are supposed to be working. This is not a server caused issue, but something that appears to be part of how WordPress is generating the path. You may need to send a message to the guy who gave you the instructions for the rewrite. It is possible that the re-write rule needs to be adjusted. During our testing, I did notice that you removed the graphic. So, I could not continue to troubleshoot the problem. If you do continue to have issues with it, please let us know. If you intend to have us continue to review the problem, could provide us an example of the issue (since you removed the existing one)? Thanks for your patience! Regards, Arnel C.