Skip to Content Skip to Menu

how to shorten urls without a 3rd party component

  • jakobe75
  • jakobe75
  • OFFLINE
  • Posts: 104
  • Thanks: 3
  • Karma: 3
13 years 8 months ago #157774 by jakobe75
I need a Howto on this, I have googled it and searched quite a but and havent found anything that works.

when I use short urls on my site the profiles look like this:

www.domain.com/community/profile/profile/userprofile/BobSmith

Thats just a little too long for my liking, I only have one public link to CB, so why is it necc to have all the /profile/profile/userprofile..?

I dont want to SEF every single link and url on the entire site.
mainly just the community.

heck I'd even be happy with domain.com/profile/BobSmtih



I tried adding an error.php page to my templates folder
with this code I found in the forum
but all I got was blank pages


<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
if (($this->error->code) == '404') {
$profile=str_replace("/", "", $_SERVER);
header("Location:profile/userprofile/".$profile.""«»);
exit;
}
?>



I own sh404sef but it adds at least a 35% load on the server which reduces page loading times immensely.

and I dont have a clear understanding on how to just isolate CB items in sh404sef.


Does anyone have any tips, suggestions, spare code or a few forums posts to share?
My users are buggin the crap outta me to incorporate this somehow.


thanks

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

  • kenb101
  • kenb101
  • OFFLINE
  • Posts: 21
  • Thanks: 0
  • Karma: 0
11 years 9 months ago #221151 by kenb101
Hello Jakobe75,
I have the same problem as the one you discussed over a year ago. I want to shorten my users profiles to www.website.com/username . Did you ever find a solution for your problem?

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

Moderators: beatnantkrileon
Powered by Kunena Forum