url_rewriter

时间:2015-04-11 13:18:32
【文件属性】:

文件名称:url_rewriter

文件大小:6KB

文件格式:ZIP

更新时间:2015-04-11 13:18:32

php url rewriter

php一个不错的url重写的实现。eg. Steps for translate a page which is "foo.php?id=45" to its URL friendly mode. * Download http://cesars.users.phpclasses.org/url_rewriter * Edit url_handler.php * Add a new rule $url->add_rule("foo.php","/entry-[:number1].html"); * Change all your links foo.php?id=45 for /entry-45.html * Edit foo.php adding an extra header <?php $id = $urlVars['number1']; //check if $id exist if ($id not exist) $urlHandler->error404(); //handle request as you did before ?>


【文件预览】:
url_rewriter.php
example-urlrewriter
----error.php(71B)
----index.php(584B)
url_handler.php
readme.txt
.htaccess

网友评论