---
description: >-
  https://wpml.org/forums/topic/removing-trailing-slash-from-language-directories/
---

# \[WPML] Removing trailing slash from Language directories (ok)

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-MdzfB4dI2_k6raVMyWq%2F-MdzfNIxBw13cNU8DJKF%2FScreenshot_1.jpg?alt=media\&token=8aa81a8c-2c7a-4824-a651-59058c233226)

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-MdzfB4dI2_k6raVMyWq%2F-Mdzfag6Q0x8XXmG1_IO%2FScreenshot_2.jpg?alt=media\&token=51e2c179-4fab-47f1-979e-9f7a8d7468ad)

##

Link: wp-content/plugins/sitepress-multilingual-cms/classes/canonicals/class-wpml-canonicals-hooks.php

{% embed url="https://wpml.org/forums/topic/removing-trailing-slash-from-language-directories/" %}

```
) I think this is a known issue, can you please check next quick fix:

Please make a backup before proceeding.

Set the permalink without trailing slash /%postname% and also apply the quick fix in the file wp-content/plugins/sitepress-multilingual-cms/classes/canonicals/class-wpml-canonicals-hooks.php:

On line number 56 :

1
if ( 0 !== strpos( $actual_uri, '/' . $lang . '/' ) ) {
replace the above code with the one below

1
if ( 0 !== strpos( $actual_uri, '/' . $lang  ) ) {
Source: https://wpml.org/forums/topic/remove-trailing-slash-from-the-home-page/
```

Link: ok

{% embed url="https://wpml.org/forums/topic/remove-trailing-slash-from-the-home-page/" %}

