0
有誰知道如何改寫像重寫規則可以做到嗎?
/index.php?option=com_k2&view=item&id=30:name-of-item
到
/index.php/name-of-item
也許
/index.php/blog/name-of-item
有誰知道如何改寫像重寫規則可以做到嗎?
/index.php?option=com_k2&view=item&id=30:name-of-item
到
/index.php/name-of-item
也許
/index.php/blog/name-of-item
你可以做到這一點使用的RewriteCond的組合和重寫規則:
RewriteCond %{QUERY_STRING} ^.*:(.*)$
RewriteRule ^/index.php /index.php/%1
其中%1是對在RewriteCond表達式中捕獲的組的反向引用。
來源:
我試過,但不工作......我不熟悉這一點,所以任何幫助的讚賞...讚賞......非常感謝...... – DestroYer
...我需要的解決方案在這個例子中,因爲我不是很瞭解這些條件和代碼的... – DestroYer