Community

Forums » SEPHP Help and Tips

How to change blog URL structure?

  • October 3, 2019 5:54 PM EDT

    I am not happy with the current way that blog urls are formed. It looks like this: 

     

    https://my.homeschoolerspace.com/blogs/1/1/hello-world

    And the user blog page looks like this:

    https://my.homeschoolerspace.com/blogs/1

    It's the use of the user id that I don't like. It's not very sharing-friendly. If a user wants to share a link to their blog, it should have their username in it.

     

    This didn't sound like it should be very hard to change. However, no matter what I do, I can't get the change to work. I even tried doing nothing except manually changing the actual user_id values in the DB from the user id to the user name. This successfully changed all the URLs being generated to a structure of:

    https://my.homeschoolerspace.com/blogs/admin/1/hello-world

    However, clicking on the link to visit the blog results in a "page not found" error. Can someone please explain to me what I'm doing wrong? I don't see any reason that the changes I've attempted shouldn't work.

     

    P.S., I was further mystified to discover that the URL does not even CARE what user id is included in the link. If user id 1 posted this blog post in question, I can change the blog URL with any user number, e.g.

    https://my.homeschoolerspace.com/blogs/31/1/hello-world

    and it STILL brings me to the same page. How does that make sense? It doesn't work when it's pulling the username from the table, but it DOES work when it has a completely wrong value that ISN'T on the table?

     

    • 3693 posts
    October 3, 2019 6:17 PM EDT

    I am not sure how to change it. I did check feature requests as I thought I had seen the request and I had here, http://community.socialengine.com/forums/topic/641/blog-permalink ;. It is not well formed though. If you would, can you please post a comment there that describes a better blog URL structure ? We should improve it.

  • October 3, 2019 8:43 PM EDT

    I've added a request to the thread. Hopefully that is descriptive enough (my formatting got a little wonky, I hope that doesn't matter). I definitely look forward to seeing it changed, as there seems to be nothing I can do about it in the meantime.

    • 3693 posts
    October 4, 2019 4:50 AM EDT

    Thank you! I think there may have been a rewrite plugin in the store but I'm not sure if that would help. I bought the Articles plugin from SocialNetworking.Solutions but haven't had time to load it to my site. Have you checked to see if it offers different url structure? In case you can't wait for the feature to be accepted/implemented.