1
1)ユーザープロファイルを書き換えるhtaccessがあります。次のコードwhith http://example.com/Ernest
httacces conflictsユーザーのプロファイルとユーザーの投稿を書き換えます。
へ
http://example.com/account.php?p=profile&username=Ernest
:
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ account.php?p=profile&username=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ account.php?p=profile&username=$1
それは良い作品...
2)、ユーザーの投稿を書き換え次httaccess
http://example.com/account.php?p=post&id=12345678
)それは次のhttaccess
RewriteRule ^post$ account.php?p=post [QSA]
3で動作します
http://example.com/post?id=12345678
に誰もが孤立良い動作しますが、現時点では、私は、ユーザーが&投稿プロファイル書き換えられていることが1つのファイルに両方のhtaccessのコードをミックスしたいです。それは失敗する!どうやったらそれを働かせるべきですか?
まだ作業中です。ありがとうございます。 – Doe
しかし、 '-d'と' -f'はどういう意味ですか? – Doe
このルールの上のコメントには、 '-d'はディレクトリを検出し、' -f'は既存のファイルを検出します。 – anubhava