所以我需要这个:
http://example.com/panel/index.php?_url=/foo/bar/
我需要让htaccess强制它显示为
http://example.com/panel/foo/bar/
使用htaccess
。
我该怎么做呢?
答案 0 :(得分:0)
你可以试试这个:
func ReturnUserInfo(u User) (y User){
// Retrieve first field from u and set them to field and value.
// NOT explicitly stating field := email, value := u.Email
db, _ := sql.Open("mysql", "root:password@/users")
_ := db.QueryRow("SELECT user_id, name, email FROM users WHERE ? = ?", field, value).Scan(
&u.User_id, &u.Name, &u.Email)
y = User{
User_id: u.User_id,
Name: u.Name,
Email: u.Email,
}
return y
}
“?”在RewriteRule的末尾需要从结果字符串中删除GET参数。