IIS

  
での擬似静的ルールと設定方法

最近、多くのWebマスターが擬似静的問題について尋ねるようになりました。

shopex4.8
3.0の無料リライトコンポーネントをダウンロードするhttp://www.helicontech.com/download/isapi_rewrite/ISAPI_Rewrite3_0056_Lite.msi
デフォルトのパスに従ってインストールした後、C:\\ Program Files \\ Helicon \\を開きます。 ISAPI_Rewrite3 \\ httpd.conf
次の規則を追加します。
#Helicon ISAPI_Rewrite設定ファイル
#Version 3.1.0.56
RewriteBase /
RewriteCond%{REQUEST_FILENAME} \\。 Htm | Php | Php2 | Php3 | Php4 | Php5 | Phtml | Pwml | Inc | Asp | Aspx | Ascx | Jsp | Cfm | Cfc | Pl | Cgi | Shtml | Shtm | Phtm | Xml)$ RewriteCond%{REQUEST_FILENAME}!-d
RewriteRule ^(。*)$ index.php?$ 1 [L]

[ ,null,null,3],ISAPI_Rewrite]

#3600 = 1時間 CacheClockRate 360​​0

RepeatLimit 32

#httpd.iniファイルとhttpd.parse.errorsファイルを
#アクセスから保護するHTTPを通してRewriteRule ^(。*)/archiver /((fid | Tid) - [0-9] + \\。html)\\?*(。*)$ 1 /archiver /index \\ .php \\?$ 2& $ 4 RewriteRule ^(。*)/forum - ([0 -9] +) - ([0-9] +)\\。html \\?*(。*)$ 1 /forumdisplay \\ .php \\?fid = $ 2& page = $ 3&$ 4
RewriteRule ^( 。*)/thread - ([0-9] +) - ([0-9] +) - ([0-9] +)\\。html \\?*(。*)$ $ 1 /viewthread \\ .php \\ ?tid = $ 2&extra = page \\%3D $ 4& page = $ 3& $ 4
RewriteRule ^(。*)/space-(ユーザー名| Uid) - (。+)\\。html \\?*(。*)$ 1 /space \\ .php \\?$ 2 = $ 3 $ 4 RewriteRule ^(。*)/tag - (。+)\\。 HTML \\?*(。*)$ $ 1 /tag \\ .php \\?name = $ 2& $ 3

shopex4.8のコンポーネントを読み込むようにiisを設定する必要があります。
iisを開き、右クリックします。サイトのプロパティ - ISAPIフィルタ - 追加 - フィルタ名はISAPI_Rewrite3です。 - 実行可能ファイルはISAPI_Rewrite.dllへのパスです。例:C:¥Program Files¥Helicon¥ISAPI_Rewrite3¥ISAPI_Rewrite.dll最後に再起動したiis
もちろん、ISAPI_Rewrite3ディレクトリをサイトのルートディレクトリに入れることもできますが、ユーザーと "ネットワークサービス"に読み取り権限を与えることを忘れないでください。

注意:サーバやvpsの中には権限を持っているものがありますが、インストール後はhttpd.confには全員とシステムに対する権限しかないかもしれません。


shopex4.7
無料のrewrite2.0コンポーネントのダウンロードアドレスhttp://www.isapirewrite.com/download/isapi_rwl_x86_0072.msi
インストール後に次の規則を追加してください
規則
[ISAPI_Rewrite]

#3600 = 1時間CacheClockRate 360​​0

RepeatLimit 32

#Home
RewriteRule /index.html /index RewriteRule /default.html /index.php#店舗に関するお知らせRewriteRule /bulletin.html /index.php\\?gOo=article_list.dwt&acat=1
RewriteRule /bulletin_( [0-9] +)。html /index.php\\?gOo=article_list.dwt&acat=1&p=$1
#商品の分類
RewriteRule /catalog.html /index.php\\?gOo= Goods_category.dwt
#すべての製品
RewriteRule /list.html /index.php\\?gOo=goods_search_list.dwt
RewriteRule /list_([0-9]+).html /index.php \\? gOo = goods_search_list.dwt& p = $ 1
#Member Center
RewriteRule /member.html /index.php\\?gOo=member_home.dwt
#Help Center&FAQ
RewriteRule /faq。 Html /index.php\\?gOo=help.dwt&acat=2
RewriteRule /faq_([0-9]+).html /index.php\\?gOo=help .dwt& acat = 2& p = $ 1
#secure transaction
RewriteRule /safe.html /index.php\\?gOo=help_safe.dwt
#購入プロセス
RewriteRule /howtobuy.html /Index.php \\?gOo = help_buystep.dwt
#支払い方法
RewriteRule /howtopay.html /index.php\\?gOo=help_send.dwt
#お問い合わせ
RewriteRule /contactus.html /Index.php \\?gOo = help_contact.dwt
#私たちについて
RewriteRule /aboutus.html /index.php\\?gOo=help_copyright.dwt
#カスタマーメッセージ
RewriteRule /feedback.html /Index.php \\?gOo = shopbbs.dwt
#フレンドリーなリンク
RewriteRule /friendlink.html /index.php\\?gOo=linkmore.dwt
#ユーザー登録
RewriteRule /register.html /Index.php \\?gOo = register_1.dwt <パスワード> RewriteRule /lostpass.html /index.php\\?gOo=forget.dwt
#製品詳細ページ
RewriteRule /product /( [0-9] +).html /index.php\\?gOo=goods_details.dwt&goodsid=$1
RewriteRule /product_([0-9]+).html /index.php\\?gOo=goods_details。 Dwt& goodsid = 1ドルRewriteRule /([0-9]+)_([^.]*).html /index.php\\?gOo=goods_details.dwt&goodsi d = $ 1
#新しいページ
RewriteRule /article_([0-9]+).html /index.php\\?gOo=help_details.dwt&articleid=$1
RewriteRule /message _([0 html /index.php\\?gOo=article_details.dwt&articleid=$1
#カテゴリの詳細リスト
RewriteRule /catalog_([0-9]+).html /index.php \\ ?gOo = goods_search_list.dwt& gcat = $ 1 RewriteRule /catalog_([0-9]+)_([0-9]+).html /index.php\\?gOo=goods_search_list.dwt&gcat=$1 & p = $ 2
#リライトルール/addtofavorites_([0-9]+).html /index.php\\?gOo=addmembergoods.do&goodsid=$1
#ホームページの最新情報、推奨、特別オファー
RewriteRule /list_([a-zA-Z]+).html /index.php\\?gOo=goods_search_list.dwt>ype=$1
RewriteRule /list _([a-zA- Z] +)_([0-9] +)。html /index.php\\?gOo=goods_search_list.dwt>ype=$1&p=$2


以下はiisを設定するための必要性です。 Shopex4.7はコンポーネントをロードします、方法はshopex4.8と同様です:
開いているIIS、あなたのサイトのプロパティを右クリック - ISAPIフィルタ - 追加 - フィルタ名はRewriteです - 実行可能ファイルはRewrite.dllのパスです。 、たとえば、E:\\ home \\ LocalUser \\ rewrite \\ Rewrite.dll
最後にiis
rewrite.dllを再起動すると、ルールを任意のディレクトリに配置できますが、そのディレクトリにはユーザーに読み取り権限を付与することを忘れないでください。

上記はshopex4.8とshopex4.7のルールと設定方法です。 Discuz、phpwindなどの他のプログラムがiisにある場合、それは互いに影響を及ぼし、次にiisを開き、サイトプロパティを右クリック - ISAPIフィルタ - isapi_rewriteを削除します。設定すると他のプログラムと衝突します。
isapi_rewrite3.0とisapi_rewrite2.0を混在させることはできません。


問題の長さから、今ではshopex4.7 /4.8、Discuz6 /NT2.5、ecshop、dvbbs、phpwind、wordpress、Discuz6 + ecshopおよびその他の疑似静的ルールとコンポーネントがダウンロード用にパッケージされています。


上記の設定は別のサーバーとvpsを借りるためのものですが、仮想ホストはサービスプロバイダーとして実行する必要があるため、監視する必要はありませんが、まだ表示されていません。人気のプログラムがサポートされています。

Copyright © Windowsの知識 All Rights Reserved