1
我非常喜歡.ht-access的初學者......但我想知道如何將尾部斜槓更改爲連字符並將.html放在末尾。使用htaccess轉換尾部斜槓使用連字符
我的.htaccess
RewriteRule ^/?product/([a-z0-9\-]+)\/?([0-9]+)$ index.php?menu=product&perma=$1&lang=en&year=$2 [L]
它給了我localhost/product/name/year
但所需的結果我需要的是
localhost/something-product-name-something-year.html
太謝謝你了... :) –
不客氣,很高興它解決了。 – anubhava
它解決了我的問題結果:localhost/product-name-year ... :) –