PEAK XOOPS - TinyDのmod_rewriteについて質問です。 in englishin japanese

TinyDのmod_rewriteについて質問です。

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/7/19 23:21
cho  企霹始   Posts: 4
OCEAN-NETサイト上で質問させて頂いていたchoです。
この場にて改めて質問させていただきます。

まず、ディレクトリ構成ですが
//ドメイン.jp/Xoops/modules/TinyD
と言う構成にて展開しています。

サーバー環境ですが
詳しい環境までは解りませんがサーバー管理人に
メールで質問したところmod_rewriteは利用可能との事です

WRAP3についてですが。
TinyD同梱の.htaccess.rewriteを.htaccessにリネーム
.htaccessの位置は
//ドメイン.jp/Xoops/modules/TinyD/.htaccess
になります。
内容は何も書き換えてません。

その状態でもWRAP3が正常に作動しません。
html文章を
//ドメイン.jp/Xoops/modules/text/content
内にFTPにて直接UPし、モジュールメニューにて
WRAP3を選択

TinyDトップページメニューにて
//ドメイン.jp/modules/TinyD/rewrite/tc_1.html
となっているリンク先に飛んでも404状態です。

WRAP1・2・4は正常に動作します。


.htaccessの内容は以下の通りです。

RewriteEngine on

RewriteRule ^rewrite/tc_(.*).html$ index.php?id=$1 [L]
RewriteRule ^rewrite/(.*.html?)$ rewrite.php?wrap=$1 [L]
RewriteRule ^rewrite/index.php(.*)$ index.php$1 [L]
RewriteRule ^rewrite/comment_new.php(.*)$ comment_new.php$1 [L]
RewriteRule ^rewrite/comment_post.php(.*)$ comment_post.php$1 [L]
RewriteRule ^rewrite/comment_reply.php(.*)$ comment_reply.php$1 [L]
RewriteRule ^rewrite/comment_edit.php(.*)$ comment_edit.php$1 [L]
RewriteRule ^rewrite/comment_delete.php(.*)$ comment_delete.php$1 [L]
RewriteRule ^rewrite/(.*)$ content/$1 [L]
Votes:79 Average:8.99
Previous post - Next post | Parent - No child | Posted on 2005/7/20 0:19
yshima  企霹始   Posts: 6
Quote:
html文章を
//ドメイン.jp/Xoops/modules/text/content

「//ドメイン.jp/Xoops/modules/TinyD/content」内にあなたの表示したいhtml文章を現在のディレクトリ構造のまま置きます。

例えば、

modules/TinyD/content/hoge.html
modules/TinyD/content/images/

*「.htaccess」の内容を変更していない場合
Votes:25 Average:5.60
Previous post - Next post | Parent - Children.1 | Posted on 2005/7/20 7:04
GIJOE  黎扦烦菱   Posts: 4110
choさん、こんにちは。
なるほど、通常のwrap3すら動かないのですね。

Quote:
サーバー環境ですが
詳しい環境までは解りませんがサーバー管理人に
メールで質問したところmod_rewriteは利用可能との事です
mod_rewrite利用可能と一口にいっても、いろいろあります。
「さくら」さんのmod_rewriteには確かクセがあったはずです。
日本公式でもたびたび話題になってるはずですよ。

RewriteBaseを各ディレクトリで明示的に指定しなければいけない、とか。

そのあたりは、むしろホスティングサービスが提供する掲示板などの方が、より詳しい情報が得られると思います。
Votes:12 Average:5.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/7/20 12:37
cho  企霹始   Posts: 4
>yshimaさん
すみませんでした。私の記述ミスです。
Quote:
「//ドメイン.jp/Xoops/modules/TinyD/content」内にあなたの表示したいhtml文章を現在のディレクトリ構造のまま置きます。
との事ですが。
Quote:
//ドメイン.jp/Xoops/modules/text/content
内にFTPにて直接UPし、モジュールメニューにて
WRAP3を選択
と書きましたがここでいうtextとはTinyDの改名した名前です。

>GIJOEさん
Quote:
そのあたりは、むしろホスティングサービスが提供する掲示板などの方が、より詳しい情報が得られると思います。
ご返答有難うございます。
正直な所、一体何が原因かの特定さえ出来なかった状態ですので
解決の糸口が見えただけでも非常に有り難いです。
では再度「さくら」にてmod_rewriteについての仕様やルールについて
質問したいと思います。

ご返答くださった方々。有難うございました。

Votes:27 Average:5.19
Previous post - Next post | Parent - Children.1 | Posted on 2005/7/20 17:24
GIJOE  黎扦烦菱   Posts: 4110
役に立つかどうか判りませんが、
http://jp.xoops.org/modules/newbb/viewtopic.php?topic_id=9888&forum=17&post_id=47381#foru...
なんて参考になりませんか?
Votes:24 Average:5.42
Previous post - Next post | Parent - Children.1 | Posted on 2005/7/20 20:08
cho  企霹始   Posts: 4
Quote:
役に立つかどうか判りませんが、
http://jp.xoops.org/modules/newbb/viewtopic.php?topic_id=...
なんて参考になりませんか?

はい、大変参考になりました。
少しは進展(のか?)した気がします。(笑)
何にせよ、何も手付かずの状態からの進展ですので
調べていく方向性の目処が付いた事に、有り難く思います。

ご紹介にあがった参考URLは、私の環境と酷使しており
まさに原因はこれである!という感じです。

私のXoopsインストールの環境として記述漏れがありました。
/home/アカウント名/www/hogehoge/Xoops本体/~~

となっており、このhogehoge部に対してサブドメインを指定してあります。
これがエイリアスと言うのでしょうか?
URLとしては
//hogehoge.アカウント名//Xoops本体/modules/TinyD
になっています。

そこでRewriteBaseですが
一通りの組み合わせで試してみた所

RewriteBase / →404
RewriteBase /TinyD →404
RewriteBase /rewrite →404
RewriteBase /TinyD/rewrite →404
RewriteBase /modules/TinyD →404
RewriteBase /hogehoge/modules/TinyD →404
RewriteBase /www/hogehoge/modules/TinyD →404
RewriteBase /home/アカウント名/www/hogehoge/modules/text →404

考えられうる組み合わせは試してみたのですが
状況はあまり変わっていません。

エラー表示ですが
これは RewriteBase /modules/TinyD 時の表示です。

Not Found
The requested URL /modules/TinyD/rewrite/tc_2.html was not found on this server.

.htaccessは以下の通りになっています。
RewriteEngine on
RewriteBase /modules/TinyD

RewriteRule ^/rewrite/tc_(.*).html$ index.php?id=$1 [L]
RewriteRule ^/rewrite/(.*.html?)$ rewrite.php?wrap=$1 [L]
RewriteRule ^/rewrite/index.php(.*)$ index.php$1 [L]
RewriteRule ^/rewrite/comment_new.php(.*)$ comment_new.php$1 [L]
RewriteRule ^/rewrite/comment_post.php(.*)$ comment_post.php$1 [L]
RewriteRule ^/rewrite/comment_reply.php(.*)$ comment_reply.php$1 [L]
RewriteRule ^/rewrite/comment_edit.php(.*)$ comment_edit.php$1 [L]
RewriteRule ^/rewrite/comment_delete.php(.*)$ comment_delete.php$1 [L]
RewriteRule ^/rewrite/(.*)$ content/$1 [L]




Votes:26 Average:5.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/7/21 14:34
GIJOE  黎扦烦菱   Posts: 4110
う~ん、やはり判らないですね。
結局、環境依存問題は、利用者自身が解決しなければなりませんから。

ただ、エラーコードなどを判断する限り、本当にmod_rewriteが有効になっているのか、という時点で怪しいように思えます。

例えば、DocumentRoot以外の.htaccessは読み込まない仕様になっているとか。

もっとずっとシンプルな例で、mod_rewriteが有効に機能しているかどうかをチェックした方が結果的に早い気がします。
Votes:20 Average:3.50
Previous post - Next post | Parent - Children.1 | Posted on 2005/7/21 23:02
cho  企霹始   Posts: 4
色々親身になっていただき本当に有難うございます。

さくらにメールにて質問中ですので解決の暁には
結果報告させて頂きます。
サクラのレンタルサーバーでは、公式にXoopsを推奨しているので
恐らく、私と同様の問題を抱えている人が結構いるのではと
思いますので、少しでも役に立てれば幸いです。

、、、まだ解決していないけどね(汗;


Votes:7 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2005/11/11 17:11
kaba  企霹始   Posts: 1
こんにちは。

実は、私もさくらのレンタルサーバーでTinyDを使っています。
同じようにmod_rewriteでハマっているのですが、その後この問題は解決されたのでしょうか?

もし解決済みでしたら、ぜひ経過を参考にさせていただきたいのですが。

よろしくお願いいたします。
Votes:8 Average:1.25

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!