2017-06-27 29 views
0

最近フォーラムをvBulletinからSMFに移行しましたが、URL http://www.fjcc.com.au/showthread.php?t=3133&page=2をURL http://fjcc.com.au/forum_fjcc/index.php?topic=3133.0に変換するRewriteCond/RewriteRuleを作成する際に問題があります。ルールは私は上記のURLを返す必要がありMWLのhtaccessのテスターに​​よるとhtaccess書き換えルール - vBulletin to SMF

RewriteEngine On 

# SMF Rewrite rules for vBulletin links after vBSEO removed 
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+/?$ 
RewriteRule ^showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^t=([0-9]+).*&p=([0-9]+)/?$ 
RewriteRule ^showthread.php$ /forum_fjcc/index.php?topic=%1.msg%2#msg%2 [L,R=301] 
RewriteCond %{QUERY_STRING} ^t=([0-9]+)/?$ 
RewriteRule ^showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+/?$ 
RewriteRule ^forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^f=([0-9]+)/?$ 
RewriteRule ^forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)/?$ 
RewriteRule ^newthread.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$ 

# SMF Rewrites for cms directory 
RewriteRule ^cms/list.php$ /forum_fjcc/index.php?action=profile;u=%1 [L,R=301] 
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+/?$ 

# SMF Rewrites for forum directory 
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+/?$ 
RewriteRule ^forum/showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^t=([0-9]+).*&p=([0-9]+)/?$ 
RewriteRule ^forum/showthread.php$ /forum_fjcc/index.php?topic=%1.msg%2#msg%2 [L,R=301] 
RewriteCond %{QUERY_STRING} ^t=([0-9]+)/?$ 
RewriteRule ^forum/showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+/?$ 
RewriteRule ^forum/forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^f=([0-9]+)/?$ 
RewriteRule ^forum/forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)/?$ 
RewriteRule ^forum/newthread.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 

# SMF Rewrite rules for vBulletin links before vBSEO removed 
RewriteRule ^f[\d]+/.+-([\d]+).*/index([\d]+).html/?$ /forum_fjcc/index.php?topic=$1.0 [L,R=301] 
RewriteRule ^f([\d]+)/index([\d]+).html/?$ /forum_fjcc/index.php?board=$1.0 [L,R=301] 
RewriteRule ^f[\d]+/.+-([\d]+)-post([\d]+)/?$ /forum_fjcc/index.php?topic=$1.msg$2#msg$2 [L,R=301] 
RewriteRule ^f[\d]+/.+-([\d]+).*/?$ /forum_fjcc/index.php?topic=$1.0 [L,R=301] 
RewriteRule ^f([\d]+)/?$ /forum_fjcc/index.php?board=$1.0 [L,R=301] 
RewriteRule ^archive/index.php/t-([\d]+).*html/?$ /forum_fjcc/archive2.php?topic=$1.0 [L,R=301] 
RewriteRule ^archive/index.php/f-([\d]+).*html/?$ /forum_fjcc/archive2.php?board=$1.0 [L,R=301] 
RewriteRule ^archive/index.php/?$ /forum_fjcc/archive2.php [L,R=301] 
RewriteRule ^members/([\d]+).html/?$ /forum_fjcc/index.php?action=profile;u=$1 [L,R=301] 

Redirect 301 /index.php /forum_fjcc/ 
Redirect 301 /forum/showthread.php /forum_fjcc/index.php 
Redirect 301 /showthread.php /forum_fjcc/index.php 
Redirect 301 /blog/entry.php /forum_fjcc/index.php 
Redirect 301 /entry.php /forum_fjcc/index.php 
Redirect 301 /blog/blog.php /forum_fjcc/index.php 
Redirect 301 /blog.php /forum_fjcc/index.php 
Redirect 301 /cms/content.php /forum_fjcc/index.php 
Redirect 301 /forum/ /forum_fjcc/index.php 

が、それは起きていない - 私は:

ルートディレクトリにある.htaccessファイルは、次のようになります代わりに/forum_fjcc/index.php?t=3133 &ページ= 2(ウェブサイトのURLの前に接頭辞)を付けてください。

私はこの問題を1週間以上取り組んできましたが、私はあらゆる成功を伴わずに見つけたすべてのRewriteCond/RewriteRuleの組み合わせを試しました。誰かが正しい方向に向けることを願っています。

答えて

0

私は最終的に自分のためにこれを整理(と、正常プロセスにはいくつかのRewriteCond /のRewriteRuleセットを連結)

問題が「301 /showthread.phpの/forum_fjcc/index.phpをリダイレクト」声明でした(私は理由を理解できませんが、URLの書き換え文がファイルの前の方にあり、最後にフラグ[L、R = 301]があるためです)。

私の作業.htacecssファイルは次のようになります。

# SMF rewrites for vBulletin after vBSEO removed (including forum directory) 

RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR] 
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$ 
RewriteRule ^(forum)?/?showthread.php$ /forum_fjcc/index.php?topic=%1.msg%2#msg%2 [L,R=301] 

RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR] 
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$ 
RewriteRule ^(forum)?/?showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301] 

RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR] 
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$ 
RewriteRule ^(forum)?/?forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 

RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$ 
RewriteRule ^(forum)?/?newthread.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301] 

# SMF rewrites for vBulletin before vBSEO removed 
RewriteRule ^f[\d]+/.+-([\d]+).*/index([\d]+).html/?$ /forum_fjcc/index.php?topic=$1.0? [L,R=301] 
RewriteRule ^f([\d]+)/index([\d]+).html/?$ /forum_fjcc/index.php?board=$1.0? [L,R=301] 
RewriteRule ^f[\d]+/.+-([\d]+)-post([\d]+)/?$ /forum_fjcc/index.php?topic=$1.msg$2#msg$2? [L,R=301] 
RewriteRule ^f[\d]+/.+-([\d]+).*/?$ /forum_fjcc/index.php?topic=$1.0? [L,R=301] 
RewriteRule ^f([\d]+)/?$ /forum_fjcc/index.php?board=$1.0? [L,R=301] 
RewriteRule ^archive/index.php/t-([\d]+).*html/?$ /forum_fjcc/archive2.php?topic=$1.0? [L,R=301] 
RewriteRule ^archive/index.php/f-([\d]+).*html/?$ /forum_fjcc/archive2.php?board=$1.0? [L,R=301] 
RewriteRule ^archive/index.php/?$ /forum_fjcc/archive2.php? [L,R=301] 
RewriteRule ^members/([\d]+).html/?$ /forum_fjcc/index.php?action=profile;u=$1? [L,R=301] 

# SMF rewrite for cms author 
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$ 
RewriteRule ^cms/list.php$ /forum_fjcc/index.php?action=profile;u=%1? [L,R=301] 

# SMF rewrite for calendar 
RewriteRule ^calendar\.php /forum_fjcc/index.php?action=calendar? [L,R=301] 

# Other rewrites 
Rewrite ^blog\.php /forum_fjcc/index.php? [L,R=301] 
Rewrite ^index\.php /forum_fjcc/index.php? [L,R=301] 
Rewrite ^entry\.php /forum_fjcc/index.php? [L,R=301] 
Rewrite ^showthread\.php /forum_fjcc/index.php? [L,R=301] 
Rewrite ^blog/blog\.php /forum_fjcc/index.php? [L,R=301] 
Rewrite ^blog/entry\.php /forum_fjcc/index.php? [L,R=301] 
Rewrite ^cms/content\.php /forum_fjcc/index.php? [L,R=301] 
Rewrite ^forum/ /forum_fjcc/index.php? [L,R=301] 
関連する問題