我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

使用htaccess更新网址

I want to change the formatting of this URL:

~/index.php/user/category_grid/?id=4&name=%27Door%20Knobs%27

to

~/index.php/user/category_grid/4/Door Knob

How can I accomplish this?

Here is an example of Rewrite rule that would transform the URL

RewriteRule index.php/user/category_grid/([-\w]+)/([-\w]+)/?$   index.php/user/category_grid?id=$1&name=$2 [L]          

近期文章

  • 排序数据MYSQL [关闭]
  • 更新php5 Ubuntu
  • 新线无效
  • 具有用户名的虚拟子域
  • 在智能循环中以树格式打印
  • 在数组中输出文本字符串
  • 如何检索选择选项?
  • 我的IP Logger需要帮助
  • 数据库ID自动递增
  • sql查询显示所有天数存在于数据库的两个日期之间
  • 从mysqli获取数据的致命错误
  • ASP.NET还是PHP5? [关闭]
  • PHP游戏公式[关闭]
  • php session和rand [关闭]
  • 更新mysql数据库中的数据
  • xml和php - 输出文本
  • php购物车应用程序开发[关闭]
  • 如何在MySQL中保存密码的哈希值
  • javascript与php无法正常工作[关闭]
  • 使用AJAX而不是发送表单[重复]

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华