Permalinks for profiles not working

sunnyone341 posted 25th of February 2008 in Community Voice. 5 comments.
I have revised 99php.ini file to have Rewrite Engine On.  Put htaccess file with the following in the root folder of the domain name holding the Dolphin software:  

<IfModule mod_rewrite.c>
RewriteEngine on

# RewriteRule ^profile\.php rewrite_name.php [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .+ - [L]
RewriteRule [A-Za-z0-9_-]+ rewrite_name.php [L]
</IfModule>

Chmod .htaccess file 644.  Links to users profile using the friendly permalinks does not work.  Permalinks using Wordpress DOES work, without any workarounds needed.  

Any help?
 
Comments
·Oldest
·Top
Please login to post a comment.
mrpowless
Hi there I answered this on the forums
http://tinyurl.com/yw6bj2
smokkky
Hi mrpowless, I did exactly you told there (copied below) but it did not worked for me. Permalinks are still not working and "500 Internal Server Error" is occuring.

Can you please suggest me what may wrong?

-- Quoted --
mrpowless wrote
-------------
I'd try to uncomment:

# RewriteRule ^profile\.php rewrite_name.php [L]

so it looks like:

RewriteRule ^profile\.php rewrite_name.php [L]

from existing .htaccess an make it look for rewrite_name.php



then load below see more up in a file and save as type "all" name it rewrite_name.php

edit:goes inroot ty for pointing that out



<?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);
}

$flag = 0;
$tmp = $rewriteNick;

if (preg_match("/^rewrite_name\.php\?ID=(\d+)/",$rewriteNick,$m))
{
$flag = 1;
$rewriteNick = " `ID` = '" . (int)($m[1]) . "'";
}
elseif (preg_match("/^profile\.php\?ID=(\d+)/",$rewriteNick,$m))
{
$flag = 2;
$rewriteNick = " `ID` = '" . (int)($m[1]) . "'";
}
elseif (ereg("([a-z0-9]+.php)",$rewriteNick,$m)) {
Header( "Location: {$rewriteNick}" );
exit;
}
else
{
$rewriteNick = " `NickName` = '$rewriteNick'";
}

require_once( "inc/header.inc.php" );
require_once( BX_DIRECTORY_PATH_INC .'db.inc.php' );

$sRequest = "SELECT `ID`,`NickName` FROM `Profiles` WHERE {$rewriteNick}";
$profArr = db_arr( $sRequest );

if ($profArr)
{
$_REQUEST['ID'] = $profArr['ID'];
if( $flag )
{
header("Location: " . $site['url'] . $profArr['NickName']);
}
require_once( BX_DIRECTORY_PATH_ROOT. 'profile.php' );
exit();
}
else
{
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
echo "Page not found $tmp";
}

?>
sunnyone341
It worked fine for me after I uploaded mrpowless' suggestions. Thanks. I hope these suggestions are included in the next Dolphin release.

Smokky - I would try to chmod the file to 644, make sure it is in the root folder where Dolphin is. Make sure you have mod rewrite engine on in the base of your server.
jonbrennan
FYI. I use 1and1 shared hosting and this did not work until I added RewriteBase / to .htaccess which looks like the following:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^profile\.php rewrite_name.php [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .+ - [L]
RewriteRule [A-Za-z0-9_-]+ rewrite_name.php [L]
</IfModule>

Use in good health.
andyk692
thanks man for this reply. i sent days on this...im also at 1and1...i was about to get really really desperate about this...thank you so much!if you would hav been a girl, i would have said "i love you"!
 
 
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.
PET:0.053024053573608