sakura-editor / sakura-editor.github.io

SAKURA Editor portal site
https://sakura-editor.github.io
11 stars 12 forks source link

SourceForge の htmlhelp2 アクセスを GitHub Pages の領域へリダイレクトさせる #23

Closed kobake closed 6 years ago

kobake commented 6 years ago

これまでの経緯

22 により

http://sakura-editor.sourceforge.net/htmlhelp2/ の内容が https://sakura-editor.github.io/help/ に移行されました。

今回の目的

http://sakura-editor.sourceforge.net/htmlhelp2/* へのアクセスを https://sakura-editor.github.io/help/* にリダイレクトするように設定します。

対応方法

SourceForge の Web 領域を SFTP で直接書き換え。(バックアップは https://sakura-editor.osdn.jp/ に残してあります)

SourceForge 領域の書き換えのため、Pull request は発生しません。対応内容(.htaccess 設置等)の記録はこの Issue コメントに残していく予定です。

kobake commented 6 years ago

対応内容

.htaccess 書き換え

SourceForge (web.sourceforge.net) の /home/project-web/sakura-editor/htdocs/.htaccess に以下の記載を追加。

# Redirect help
Redirect permanent /htmlhelp2/ https://sakura-editor.github.io/help/

htmlhelp2 ディレクトリ削除

SourceForge (web.sourceforge.net) の /home/project-web/sakura-editor/htdocs/htmlhelp2 ディレクトリを削除。

確認結果

現時点での .htaccess 全文

/home/project-web/sakura-editor/htdocs/.htaccess

AddDefaultCharset Off
AddType application/x-bzip2 .bz2 .tbz
AddType application/octet-stream .cab
AddType application/x-lzh .lzh
AddDescription "Windows CAB archive" .cab
AddDescription "bzip2 archive" .bz2
AddDescription "tar+bzip2 archive" .tbz
AddDescription "LHA archive" .lzh
AddDescription "ZIP archive" .zip

# Options +Multiviews
# AddLanguage   ja  .ja
# AddLanguage   en  .en

DirectoryIndex index.html

# Redirect permanent / https://sakura-editor.github.io/
Redirect permanent /index.html https://sakura-editor.github.io/
Redirect permanent /index.html.ja https://sakura-editor.github.io/
Redirect permanent /index.html.en https://sakura-editor.github.io/index.en.html
Redirect permanent /intro.html https://sakura-editor.github.io/intro.html
Redirect permanent /download.html https://sakura-editor.github.io/download.html

# Redirect help
Redirect permanent /htmlhelp2/ https://sakura-editor.github.io/help/

# RewriteEngine on
# RewriteRule ^(index.html.ja)$ /redirect.php?$1 [R=301,L]

RewriteEngine On
RewriteRule ^$ https://sakura-editor.github.io/ [R=301,L]
RewriteRule ^/$ https://sakura-editor.github.io/ [R=301,L]
kobake commented 6 years ago

対応完了したのでクローズします。