doulai8405 2012-11-12 13:19
浏览 35

使用htaccess文件重写动态URL

i want to display the this url

http://localhost/project/sites/sample/cat.php?typ=Politics

to like this

http://localhost/project/sites/sample/Politics.html

and my htaccess code is

RewriteEngine on
RewriteRule (.*)\.html$ cat.php?typ=$1

it's working when i was gave the url manually on browser, but the url was not loaded dynamically. i want to show the second url dynamical if i click the first url. thank you to help

  • 写回答

4条回答 默认 最新

  • doutuo7609 2012-11-12 13:22
    关注

    Try this Rule:

    RewriteEngine on
    RewriteRule (.*).html$ cat.php?typ=$1
    
    评论

报告相同问题?

悬赏问题

  • ¥15 BV260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序