fancyurl 's problem

5 views
Skip to first unread message

vivi

unread,
May 6, 2005, 2:54:30 AM5/6/05
to nucle...@googlegroups.com
my nucleus cms files in "/" dir

fisrt step:
I copy all the files in [i]fancyurls[/i] dir to / dir
sec step:

edit .htaccess file
[code]
RewriteEngine On
RewriteRule ^member/(.*) index.php?arr=member/$1
RewriteRule ^item/(.*) index.php?arr=item/$1
RewriteRule ^category/(.*) index.php?arr=category/$1
RewriteRule ^blog/(.*) index.php?arr=blog/$1
RewriteRule ^archive/(.*) index.php?arr=archive/$1
RewriteRule ^archives/(.*) index.php?arr=archives/$1
[/code]

third step:
edit "/index.php" file

[code]<?php

$requestvars = $_GET["arr"];
$request_arr = explode("/", $requestvars);
if ($request_arr[0] == "item") {
$_GET["itemid"] = $request_arr[1];
$firsti = 2;
}
elseif ($request_arr[0] == "member") {
$_GET["memberid"] = $request_arr[1];
$firsti = 2;
}
elseif ($request_arr[0] == "category") {
$_GET["catid"] = $request_arr[1];
$firsti = 2;
}
elseif ($request_arr[0] == "blog") {
$_GET["blogid"] = $request_arr[1];
$firsti = 2;
}
elseif ($request_arr[0] == "archive") {
$_GET["blogid"] = $request_arr[1];
$_GET["archive"] = $request_arr[2];
$firsti = 3;
}
elseif ($request_arr[0] == "archives") {
$_GET["archivelist"] = $request_arr[1];
$firsti = 2;
}

$xflag = true;
for ($i = $firsti; $i < count($request_arr); $i++) {
if ($xflag == true) {
$j = $i + 1;
$_GET[$request_arr[$i]] = $request_arr[$j];
$xflag = false;
}
elseif ($xflag == false) {
$xflag = true;
}
}

// This file will generate and return the main page of the site
$CONF = array();
$CONF['Self'] = 'http://www.example.com/blog';

include('./config.php');

selector();

?>[/code]

but the fancyurl is doesn't work.
what shall I do?
I need your help.........

Legolas

unread,
Jun 4, 2005, 3:32:59 PM6/4/05
to nucle...@googlegroups.com
Did you edit the url?
( $CONF['Self'] = 'http://www.example.com/blog'; )

WebMaster9000

unread,
Jun 9, 2005, 11:57:35 AM6/9/05
to nucle...@googlegroups.com
I tryed to implement is on my blog, but all i got was nothing it didnt
change a thing.

And i have a feeling it has somthing to with my .htaccess file, i dont
have one.

Reply all
Reply to author
Forward
0 new messages