Getting Rid of the "/" at the end of Wordpress URLs

4 replies
I noticed that any page I create on my new Wordpress blog ends the URL with a forward slash, like this:

http://www.mysitename.com/about-me/

Is there any way to remove this?
#end #rid #urls #wordpress
  • Profile picture of the author NatesMarketing
    Should be under Settings >> Permalinks >> Custom Structure

    Rewrite it how you want it.
    {{ DiscussionBoard.errors[7910431].message }}
  • Profile picture of the author retroid
    Settings > Permalinks > Common Settings

    Use the custom structure and remove the slash there
    {{ DiscussionBoard.errors[7910439].message }}
    • Profile picture of the author imnewbie6
      Okay, I went to Custom Structure and removed the second slash at the end and that removed it from all of my pages.

      But I still have an issue with the page that I have set as my static front page. For that page, I am trying to get rid of the first slash after the domain. My static front page is my homepage, so I just want it to read like this:

      http://www.mysitename.com

      NOT

      http://www.mysitname.com/

      But when I go into custom structure again, and leave the box blank after the main domain name and click "Save Changes" it automatically to the Default Permalink Settings which is not what I want.

      Does anyone know if there is a way to remove the first slash, so that only the website name itself displays?

      Thanks.
      {{ DiscussionBoard.errors[7910686].message }}
      • Profile picture of the author Farish
        Originally Posted by imnewbie6 View Post

        Okay, I went to Custom Structure and removed the second slash at the end and that removed it from all of my pages.

        But I still have an issue with the page that I have set as my static front page. For that page, I am trying to get rid of the first slash after the domain. My static front page is my homepage, so I just want it to read like this:

        http://www.mysitename.com

        NOT

        http://www.mysitname.com/

        But when I go into custom structure again, and leave the box blank after the main domain name and click "Save Changes" it automatically to the Default Permalink Settings which is not what I want.

        Does anyone know if there is a way to remove the first slash, so that only the website name itself displays?

        Thanks.
        This is not going to happen the way you want it. This has to do with the URL standard itself.

        When a url ends with a slash it is looking at a directory, when a url is not ending with a slash it is looking for file.

        Also base on your server configuration, you may be slowing page load requests by forcing the slash to be removed. You could be forcing the server to do more work than necessary and in the future may cause 301 directs to happen because of messing with this.

        Also the person's browser that he is using may override this regardless of you making this change.

        Btw the main way to force this change has to be changing how urls are handle in your htaccess file.

        Best thing I can say is leave it alone.
        {{ DiscussionBoard.errors[7910806].message }}

Trending Topics