doulingzhuang3079 2016-08-25 11:06
浏览 63
已采纳

隐藏GET请求html / php

I'm not really sure what I'm looking for, but I know what I wanna do. Therefor it's kinda hard to search. Sorry for being stupid, the answer might be really simple.

I got a website, as of currently I take a get request like: http://website/id=123

What I want is to have it as http://website/123

The website then takes the value and does a bunch of stuff, but I'm not really sure how to get it like this. Is it from editing .htaccess or what?

How do I fix that? (again, sorry for being stupid)

  • 写回答

2条回答 默认 最新

  • dongxie9169 2016-08-25 11:56
    关注

    Specifically for you condition try this..

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^([0-9]+)$ index.php?id=$1
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料