
sunnyone341
Permalinks for profiles not working
Comments
| smokkky | 316 days ago![]() |
![]() | ![]() | |
![]() | 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 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 | 315 days ago![]() |
![]() | ![]() | |
![]() | 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 | 236 days ago![]() |
![]() | ![]() | |
![]() | 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. | ![]() |
![]() | ![]() | ![]() |
View 1 replies to this comment
Post a Comment
Please login to post a comment.This Post
sunnyone341 Blog
All Blogs



































