【发布时间】:2018-12-10 22:29:28
【问题描述】:
我想从索引页面重定向到传递 id 的其他页面。 在 html 我有这个代码 我正在使用 jquery,我有这个代码。
$("<a class='theme-btn default-btn' href='#'>Read more </a></button>").appendTo($target).click(function() {
document.location.href='post.html?id=' + $id;
});
重定向后的url是>http://example.com/post?id=14 我想变成这样>http://example.com/post/this-is-the-post-title 我该怎么做?
【问题讨论】:
-
你能在jsfiddle.net上做一个样本吗?
-
在 html 中我有
标签: mod-rewrite url-rewriting url-routing url-parameters