目前我是这样使用seo的。
PHP: domain.com/index.php?page=account&do=forgotpassword
.htaccess: domain.com/account/forgotpassword.html
但是,我想为它编写自己的处理程序,或者使用任何其他现有的处理程序来完成以下操作。
Handler: Check request URI, convert it back to normal.
--- Request URI: domain.com/?/account/forgotpassword.html
--- Converts to: domain.com/index.php?page=account&do=forgotpassword
.htaccess: RewriteRule (.*)$ ?/$1
PHP支持这样的处理程序吗?如果有,你能给我一个链接,我可以看到这样的处理程序吗?(如Code Igniter's,如果存在)
对SEO方面有影响吗?(如。Google忽略/喜欢链接)
谢谢。
-
PHP没有内置。但是框架通常有自己的路由(这就是它的名字)库:http://ellislab.com/codeigniter/user-guide/general/routing.html
-
Google不关心是什么重写了url:
.htacess
还是php,因为从客户端的角度来看绝对没有区别。