YOURLS
※現在は、オススメはしておりません。
まずは、どんなモンか試したい人は、デモサイトへどうぞ。
WordPressのプラグインではありませんが、この「Yourls」は短縮urlを自前で運用できる優れたシステムにもかかわらず、なんと無料で使用できるのです!
アフィリエイトに取り組んでいると、アフィリエイトリンクを隠したくなりませんか?(笑)
アフィリエイトリンクがあると検索エンジンの評価が下がるということもありますからね。
Yourlsはアクセス解析もできますから、かなり便利ですね。
ご使用は自己責任でお願いしますね。
サーバー環境によっては、正常に動作しない場合がありますのでご注意ください。
デモサイトは海外の無料サーバー『10hosting』を使っています。
無料でいいのですが、1ヶ月の間にコントロールパネルとフォーラムにログインしないと、アカウントを停止?させられます。
年間300円ほど払うと、ログインしないでもOKになります。僕は払っています。(上のデモサイトではありません。デモサイト見れなくなっていたらゴメンなさい!)
もしお使いのサーバーでデモサイトのような動作がしない場合は、YOURLSに対応しているサーバーをご使ってみてはどうでしょうか。
アフィリエイトをしている方は、WordPressとYourlsの両方にに対応しているサーバーがいいでしょうね。
導入手順
[numberlist]
- YOURLSをダウンロード >> こちら
- YOURLS用のデータベースを用意する。
- YOURLSの設定
- サーバーへアップロード
- インストールする
includes/config-sample.php
を開いて青線の部分を入力。ファイル名を config.php
に変更。
[php gutter=”true” firstline=”1″ highlight=”7,10,13,16,32,46,50,58″]
<?php
/*
** MySQL settings – You can get this info from your web host
*/
/** MySQL database username */
define(‘YOURLS_DB_USER’, ‘ここにデータベースのユーザー名’);
/** MySQL database password */
define(‘YOURLS_DB_PASS’, ‘ここにデータベースのパスワード’);
/** The name of the database for YOURLS */
define(‘YOURLS_DB_NAME’, ‘ここにデータベース名’);
/** MySQL hostname */
define(‘YOURLS_DB_HOST’, ‘ここにデータベースのホスト名’);
/** MySQL tables prefix */
define(‘YOURLS_DB_PREFIX’, ‘yourls_’);
/** !!! IMPORTANT !!!
* If you are UPGRADING from version 1.3,
* there are additional constants to define.
* Refer to the readme.html for details .
**/
/*
** Site options
*/
/** YOURLS installation URL, no trailing slash */
define(‘YOURLS_SITE’, ‘yourlのサイトのURL’); //
※トップディレクトリにアップロードする場合は、http://sample.com(最後にスラッシュは付けない)
/** Timezone GMT offset */
define(‘YOURLS_HOURS_OFFSET’, -9);
/** Allow multiple short URLs for a same long URL
** Set to true to have only one pair of shortURL/longURL (default YOURLS behavior)
** Set to false to allow multiple short URLs pointing to the same long URL (bit.ly behavior) */
define(‘YOURLS_UNIQUE_URLS’, true);
/** Private means protected with login/pass as defined below. Set to false for public usage. */
define(‘YOURLS_PRIVATE’, true);
/** A random secret hash used to encrypt cookies. You don’t have to remember it, make it long and complicated. Hint: copy from http://yourls.org/cookie **/
define(‘YOURLS_COOKIEKEY’, ‘C-906$A[5FqLWy[gV0kU’);
/** Username(s) and password(s) allowed to access the site */
$yourls_user_passwords = array(
‘ここにログイン用ユーザー名’ => ‘ここにログイン用パスワード’
);
/*
** URL Shortening settings
*/
/** URL shortening method: 36 or 62 */
define(‘YOURLS_URL_CONVERT’, 62); (←アフィリエイターは62に)
/*
* 36: generates case insentitive lowercase keywords (ie: 13jkm)
* 62: generate case sensitive keywords (ie: 13jKm or 13JKm)
* Stick to one setting, don’t change after you’ve created links as it will change all your short URLs!
* Base 36 should be picked. Use 62 only if you understand what it implies.
*/
/**
* Reserved keywords (so that generated URLs won’t match them)
* Define here negative, unwanted or potentially misleading keywords.
*/
$yourls_reserved_URL = array(
‘porn’, ‘faggot’, ‘sex’, ‘nigger’, ‘fuck’, ‘cunt’, ‘dick’, ‘gay’,
);
/*
** Personal settings would go after here
*/
[/php]
トップディレクトリへアップロードした場合は、
[html]http://sample.com/admin/install.php[/html]にアクセスして、インストールのボタンをクリック。
『YOURLS administration Page』をクリックすると管理画面へ移動します。