/* About ----- This directory contains extra files to make the 'fancy urls' feature even more fancier, by eliminating the 'index.php'-part of the URL Installation ------------ 1. Copy all files in this directory (except for index.html) to your main nucleus dir (where your index.php and action.php file are) If you have an already existing .htaccess file (most ftp-programs don't show hidden files by default, so don't start uploading it without checking your server). If you do, download that old one first, and copy the contents of the new .htaccess file (from the fancyurls folder) in your old one, and upload that... 2. Edit this file so that $CONF['Self'] points to your main directory. NOTE: this time, and only this time, the URL should NOT end in a slash 3. Also edit the $CONF['Self'] variable in your index.php, if you don't want to end up with index.php/item/1234 urls when people come via that way 4. Enable 'Fancy URLs' in the Nucleus admin area (nucleus management / edit settings) 5. Off you go! If it doesn't work: ------------------- Remove the files again (don't forget the hidden file .htaccess). Voila. */ // remember: this URL should _NOT_ end with a slash. $CONF['Self'] = 'http://www.momoso-net.com/~ms08'; ?>
2004-09-30: Anonymous PROXYがしたい!
Anonymous PROXY がしたくてこんなCGIを書いてみました。基本はhttp://www.cybersyndrome.net/で検索できるCGIを呼び出してIEとかMozilla Firefoxで使えるスクリプトを作るもの!内容は以下の感じで赤の部分は適当に編集してください。もちろん自分のホームページCGIに登録しましょう。ただしcurlが使えないとだめです。
#!/usr/bin/perl
###############################
# Create by MoMoSo-NET.COM.
# H.COYAMA
# Date: 2004-09-30
# $arg1 = Find Key
# $arg2 = Anonymous type
# $user =
# $passwd =
# Update: 2004-10-05
# 2005-04-05
# 2005-08-02
###############################
$buffer = $ENV{'QUERY_STRING'};
($arg1,$arg2,$user,$passwd) = split( /&/ , $buffer);
if(length($arg2) == 0) {
$arg2 = "ABC";
}
$command = "curl -A Mozilla/4.0 -u $user:$passwd -d q='$arg1' -d a=$arg2 -s http://www.cybersyndrome.net/cgi-bin/search.cgi";
@result = `$command`;
push @html, @result;
print "Content-type: text/javascript\n\n";
print "///////////////////////////////////////////////\n";
print "// MoMoSo-NET.COM.\n";
print "// AutoProxy Tool\n";
print "// Create by H.COYAMA\n";
print "// Date:2004-09-30\n";
print "// Power by http://www.cybersyndrome.net\n";
print "///////////////////////////////////////////////\n";
print "// Find option = ".$buffer."\n";
print "\n";
print "function FindProxyForURL(url,host){\n";
print "if(shExpMatch(url,\"https://*\")){\n";
print " return \"DIRECT\";\n";
print "}\n";
print "if(shExpMatch(url,\"ftp://*\")){\n";
print " return \"DIRECT\";\n";
print "}\n";
print "if(shExpMatch(url,\"https://www.momoso-net.com\")){\n";
print " return \"DIRECT\";\n";
print "}\n";
print "return \"";
登録したらIEとかMozilla Firefoxで以下のように設定しましょう。「ここに」のところ大事!
ここにhttp://www.hogehoge.com/~hogehoge/cgi-bin/momoso-proxy.pac.cgi?cc JPみたいに?以下の引数はを参考にしてください。
なお、Anonymous(A)で作成されます。
(IE)
(Mozilla Firefox)
設定が終わったらここでチェックしてみてください。もっと素敵なCGIあったら教えてください。
Category: Gentoo Linux 1 Trackback