Title: Problem with double slash
Last modified: April 4, 2018

---

# Problem with double slash

 *  [Stucco81](https://wordpress.org/support/users/stucco81/)
 * (@stucco81)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/problem-with-double-slash/)
 * Hello,
 * i’ve this problem.
 * In my functions.php file i’ve this code:
 * function add_a_slash( $permalink, $postID=”” ) {
    return trailingslashit($permalink);}
   add_filter( ‘home_url’, ‘add_a_slash’);
 * Code that i need in order to have good canonical and href-lang url… but that 
   code causes me this problem with cf7 (double slash …wp-json//contact-form-7…)
 * jquery-1.11.3.min.js:5 GET [https://www.mywevsite.com/wp-json//contact-form-7/v1/contact-forms/1453/refill](https://www.mywevsite.com/wp-json//contact-form-7/v1/contact-forms/1453/refill)
   404 ()
 * How could i fix it?
 * I could edit the code inside controller.php file? is it safe? there is another
   way to delete (only for this request) that double slash?
 * Thank you
    Vincenzo

The topic ‘Problem with double slash’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Stucco81](https://wordpress.org/support/users/stucco81/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/problem-with-double-slash/)
 * Status: not resolved