0

2 つのドメインで共有されるアプリケーションがあります。domain1.com と domain2.com の両方の仮想ディレクトリに次のものがあります。

RewriteEngine on
Options +FollowSymlinks
RewriteRule ^/application(.*)$ c:/server/web/application/www/$1

domain1.com/application と domain2.com/application の両方がそれを指すようにすると、各ドメインの下のフォルダーにアプリケーションを物理的に配置する必要がなくなります。

今、私はより深いURLを「より良く」見せたいと思っています:

domain1.com/application/account/0322734174/notes/desc

それ以外の:

domain1.com/application/account/index.php?number=0322734174&view=notes&sort=desc

しかし、私はそれを何かで動作させるのに問題があり、私が試したことはすべて何もしません. ルールの競合だと思いますか?

4

1 に答える 1

0

私はそれを考え出した!

RewriteLog
RewriteLogLevel 4

あなたの友達です(さらに多くの試行錯誤と時間)

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/application/(.*)$ c:/server/web/application/www/$1
RewriteRule ^c:/server/web/application/www/account/([^/\.]+)/?$ c:/server/web/application/www/account/index.php?action=$1

動作します。最初のルールの後に絶対パスを使用する必要がありました

御時間ありがとうございます

于 2012-11-15T19:48:27.807 に答える