Lets say you are trying to view a blog:
That specific GUID only belongs to that blog post right? Ok when I type something like this on the address bar:
Doesn't matter if you only have the GUID on the URL or whatever you type after the forward slash, it will go to that specific blog post. Now my real question is, how do you fix that so it would go to its original URL? Doesn't matter what you type after the GUID, I want it to forward or "fix" itself to its original prettified URL. Am I making sense here?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Arsalan Shah@arsalanlee
Arsalan Shah - 0 likes
- Cim@manacim
Cim - 0 likes
- Cim@manacim
Cim - 0 likes
- Cim@manacim
Cim - 0 likes
- Arsalan Shah@arsalanlee
Arsalan Shah - 0 likes
- Cim@manacim
Cim - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
You must log in to post replies.See fix https://github.com/Elgg/Elgg/pull/6899
@Liang looks like it'll forward them to a 404 error page if they typed the wrong URL, I don't want them to be forward to that.
I think you might be onto something here, I will be playing with this code!
I'm on the road right now for another 30-40 minutes but this might be the fix? I can't execute this logic on my phone.
$blog = get_entity($page[1]);
$friendly_title = elgg_get_friendly_title($blog->title);
$perm_url = $blog->guid . '/' . $friendly_time;
if($page[2] !== $friendly_title){
forward($perm_url);
}
Hopefully that works!
yes thats will work
That one didn't work but this does!
If you are making the forward, you should specify the reason too, like 301 redirect.