View Single Post
  #3 (permalink)  
Old 03-02-2008, 10:45 PM
xoail xoail is offline
New Pligger
 
Join Date: Nov 2007
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
That dint fix my problem with mysite.com/1 bug. I am using pligg as an article manager rather than a digg like website. So, I have disabled url fields from the submit area.
Somehow the title links were being redirected to mysite.com/1 for every entry. After researching a lot, I finally managed to fix it using a little trick. But I am not sure if this is the right way of going about..
This is what I did:
In out.php, comment the code -
Header( "HTTP/1.1 301 Moved Permanently" );
header('Location: '. $link->url);

and in above it add -
$url = getmyurl("storyURL", $link->category_safe_name($link->category), urlencode($link->title_url), $link->id);
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: " . $url );

This did work for me but I am just not sure if this is the right fix. Any help is highly appreciated.
Reply With Quote