【发布时间】:2012-04-28 18:24:13
【问题描述】:
PHP 有什么好的函数可以使用 Apache 的 mod_rewrite 重写 URL 吗?
$url="semantic/path/to/page";
$url=mod_rewrite_url($url,"path/to/.htaccess");
//$url is index.php?page_id=45
我的想法是简单地解析 .htaccess 文件并将其与带有 url 的字符串进行比较,但我对一些内置函数更感兴趣,但我怀疑它是否存在。
【问题讨论】:
标签: php ajax .htaccess mod-rewrite