Permalinks finally working SOLVED

If anyone has problems with permalinks causing 404 errors here is the solution:

This is what goes in the .htaccess file:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .+ - [L]
RewriteRule .* rewrite_name.php [L]

Then create a new php file and call it rewrite_name.php

and paste this in:

<?php
/***************************************************************************
*                            Dolphin Web Community Software
*                              -------------------
*     begin                : Mon Mar 23 2006
*     copyright            : (C) 2006 BoonEx Group
*     website              : http://www.boonex.com
*
*    
*
****************************************************************************/

/***************************************************************************
*
*   This is a free software; you can modify it under the terms of BoonEx
*   Product License Agreement published on BoonEx site at http://www.boonex.com/downloads/license.pdf
*   You may not however distribute it for free or/and a fee.
*   This notice may not be removed from the source code. You may not also remove any other visible
*   reference and links to BoonEx Group as provided in source code.
*
***************************************************************************/

@list($url, $vars) = explode('?', $_SERVER['REQUEST_URI']);
if( $url == '/' )
{
require_once('index.php');
exit;
}


$urlArr = explode('/', $_SERVER['REQUEST_URI']);
$rewriteNick = (strlen(trim($urlArr[count($urlArr) - 1])) ? $urlArr[count($urlArr) - 1] : $urlArr[count($urlArr) - 2]);
if ( !get_magic_quotes_gpc() )
{
$rewriteNick = addslashes($rewriteNick);
}

require_once( "inc/header.inc.php" );
require_once( "{$dir['inc']}db.inc.php" );

$profArr = db_arr( "SELECT `ID` FROM `Profiles` WHERE `NickName` LIKE '{$rewriteNick}' AND `Status` = 'Active'" );
if ($profArr)
{
$_REQUEST['ID'] = $profArr['ID'];
require_once( "{$dir['root']}profile.php" );
exit();
}
else
{
header("Location: {$site['url']}index.php");
}

?>

After which place both files into the root.

Also make sure mod_rewrite is enabled in apache.

Cheers!

Quote · 4 Aug 2008

Thanks for that, did the trick for me, I was having a hard time trying how to get the permalinks to work

Quote · 25 Aug 2008

Great Job, this fixed my issue!

Quote · 21 Sep 2008

so far, everything i have tried does not work.

:(

Quote · 23 Sep 2008

so for me....  everything is fine but no gallery and no permalinks.......  ***whine***

Quote · 23 Sep 2008

Hi,

 

Sorry I might not be looking in the right place, but I only have one htaccess file in the root?

 

Where do I find the two to edit?

 

Thanks

Quote · 18 Mar 2009

Sorry I didn't read the instructions properly :-)

 

All sorted now and works great.... thanks so much for this!

 

Best,

 

Mika

Quote · 18 Mar 2009

Hi , thanks for the post. This solution is working fine for profiles, but not for groups, photos etc.. it is getting re-directed to the home page when i click on the groups link or the photos link with the permalinks activated. can you please help me solving this.

Thank

Quote · 10 Apr 2009

Hi , thanks for the post. This solution is working fine for profiles, but not for groups, photos etc.. it is getting re-directed to the home page when i click on the groups link or the photos link with the permalinks activated. can you please help me solving this.

Thank

Quote · 10 Apr 2009

Hi , thanks for the post. This solution is working fine for profiles, but not for groups, photos etc.. it is getting re-directed to the home page when i click on the groups link or the photos link with the permalinks activated. can you please help me solving this.

Thank

Same here :(

Quote · 2 Jun 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.