0
我想要做一些URL重寫與htacess
,htacess重寫除了一個參數
http://www.mydomain.com/article.php?post_id=123&title=2014-03-02-today-s-trends
=>
http://www.mydomain.com/article/123/2014-03-02-today-s-trends
但一些特殊的規則。如果一些文章點擊rss或社交分享。我想:
http://www.mydomain.com/article.php?post_id=123&title=2014-03-02-today-s-trends&source=rss
=>
http://www.mydomain.com/article/123/2014-03-02-today-s-trends?source=rss
我重寫代碼在這裏
RewriteRule ^article/(\d+)/(.*)\?source=(.*)?$ article.php?post_id=$1&title=$2&source=$3
,但得到500錯誤。如何以正確的方式做到這一點?謝謝。