且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用PHP和MySQL创建用户配置文件

更新时间:2021-08-01 16:21:20

您需要创建一个mod重写,该重写采用第一个目录并将其作为$ _GET参数传递.

You would need to create a mod rewrite that took the first directory and passed it as a $_GET parameter.

尝试一下:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)/$ index.php?user=$1

那应该将'/'之后的任何内容重写为index.php?user = directory

That should rewrite anything after '/' as index.php?user=directory