Making Short Profile URLs in Elgg

Something that elgg sites have is that they use long urls for profile pages. There is no guide for making then short and easy to share. Until now.

The important thing about short links is that you can easily share to profile with anyone and it is easy to remember. Regular elgg profile urls look like this:  “website.com/pg/profile/username” As you can see, that’s a long non user-friendly url. Hard to share and hard to remember. So to make them look like this: “website.com/username” , follow these instructions: On your “public_html” look for the file “.htaccess” Opened and look for this part:
#RewriteBase /
Below that, write the following code:

RewriteRule ^([A-Za-z0-9\_\-]+)$ http://%{HTTP_HOST}/pg/profile/$1  [R]


Save it, and now you have short url for your profiles, like this: “website.com/username”

*Note: If you have a subdomain, it will become unavailable. Don’t use it if you have one.

For more info about Elgg hosting solutions please visit Arvixe-Elgg Hosting

Happy Hosting!

Rodolfo Hernandez

Tags: , , , , , , , , , | Posted under Elgg | RSS 2.0

Author Spotlight

Rodolfo Hernandez

Rodolfo Hernandez

I like photography and reading books. Currently working for Arvixe as Elgg Community Liaison. Elgg Security Expert Web Security Expert CEO of UDP SW Social Web

One Comment on Making Short Profile URLs in Elgg

  1. Deano says:

    Thanks! This works…
    I’m wondering about ways to the tell the users that the url is shorter than they think…
    because even though its forwarding correctly what gets shown is still
    yoursite.com/profile/username

Leave a Reply

Your email address will not be published. Required fields are marked *


2 + 4 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>