Skip to Content Skip to Menu

Remove url forward slash for profiles

  • jimbob70
  • jimbob70
  • OFFLINE
  • Posts: 11
  • Thanks: 1
  • Karma: 0
6 years 9 months ago #301419 by jimbob70
Remove url forward slash for profiles was created by jimbob70
Hi all, I'd like my site to display mydomain.com/profilename
At the moment because I have CB linked to a button it is more like mydomain.com/profiles/profilename

How can I achieve this?
When joining my site you get to choose your own url, so hopefully in that section it would also change to reflect what I need also?

Thanks for any help

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48495
  • Thanks: 8284
  • Karma: 1443
6 years 9 months ago #301472 by krileon
Replied by krileon on topic Remove url forward slash for profiles
You can't really do that due to the way Joomla works. Joomla needs to know what component it's trying to reach. It does this using the menu item alias. Example as follows.

Menu URL: index.php?option=com_comprofiler&view=userprofile
Menu Alias: profiles

The above tells Joomla it's going to the CB extension and outputting the userprofile view. Without this Joomla has no idea where to go. The menu alias has to be unique within its parent. So lets say this menu item is top level (it's a child menu item of another menu item). This gives you URLs like the following.

/profiles/username

Notice the alias is before the username. Joomla will convert that to the raw URL below.

index.php?option=com_comprofiler&view=userprofile

Joomla now knows where it needs to go. Without this it'll never reach CB. So it can't be removed. The only way to have what you're wanting is maybe built in 404 redirect behavior to redirect URLs to CB if they don't exist, but I don't really recommend doing this as it could cause all kinds of URL conflicts in Joomla.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum