0
我在核心PHP的网站,我想让我的海基会URL。 在我的网站从一个页面控制权转交给其他的我已经使用类似URL核心路由的方法php
header("Location: edit.php?id=12");
我读到一篇文章,但无法得到它如何实现它。
那么如何我可以链接到像“mysite.com/usr/edit” 读我读了很多关于谷歌我得到了我需要做的事情在.htaccess中的想法,但我不知道在php中需要做什么,所以我不必在网站上更改主要代码。
在此先感谢。创建与上面的代码的.htaccess文件后
RewriteEngine On
DirectoryIndex index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
:
mod_rewrite。大量的答案在这个网站上。 – 2012-08-06 06:13:21
可能重复的[Mod_rewrite动态URLS](http://stackoverflow.com/questions/6236091/mod-rewrite-dynamic-urls) – 2012-08-06 06:14:36
可能在本质上的副本http://stackoverflow.com/questions/11022509/php -dynamic-DB-页面重写的URL – chris 2012-08-06 06:17:19