search

Home  >  Q&A  >  body text

php - 如何生成动态页的短链接,不跳转

短连接格式:
http://www.abc.com/Af3aM3er
后面为8位字符串
浏览此链接,不能进行网址跳转。
浏览的实际地址为一个php页面
http://www.abc.com/index.php?...

这个如何实现了??

大家讲道理大家讲道理2914 days ago633

reply all(3)I'll reply

  • P粉929475170

    P粉9294751702022-04-23 17:19:28

    Shuba Short Link—The simplest short link tool with statistical reports. Tool introduction: Zuuba Short Link is an online platform for quickly shortening URLs. It is a data analysis tool with smooth, high-speed, and visual Internet access across the country. It is mainly used in text messages. Marketing, ***Q marketing, e-commerce operations, community operations, *** marketing, etc. Users can analyze access data online in real time, eliminating cumbersome traditional manual code statistics.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-11 09:19:52

    可以使用nginx,做重写
    rewrite ^/(.*)$ index.php?param=$1 last;

    reply
    0
  • 黄舟

    黄舟2017-04-11 09:19:52

    如果就只是这个的话可以用tp的路由功能配合上url重写:

    return array(
        "URL_ROUTER_ON" => true,
        "URL_ROUTE_RULES" => array(
            '/^([a-zA-Z0-9]{8})$/'  => 'Module/Controller/action?r=:1',//规则放到其它规则之后
        ),
    );

    reply
    0
  • Cancelreply