1
1)我有一個htaccess的重寫誰的用戶配置文件。httacces衝突改寫用戶的配置文件和用戶帖子
http://example.com/account.php?p=profile&username=Ernest
到http://example.com/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
到http://example.com/post?id=12345678
它可以用在未來httaccess
RewriteRule ^post$ account.php?p=post [QSA]
3)每個人都工作良好的隔離,但我想這兩個htaccess的代碼在一個文件中混有重寫用戶時刻型材&職位。它失敗!我應該怎麼做才能讓他們工作得更好?
我仍然在做這個工作,謝謝。 – Doe
但是'-d'和'-f'是什麼意思? – Doe
正如上述規則所述的評論所述。 '-d'檢測目錄,'-f'檢測現有文件。 – anubhava