• <legend id='h0e4L'><style id='h0e4L'><dir id='h0e4L'><q id='h0e4L'></q></dir></style></legend>

  • <i id='h0e4L'><tr id='h0e4L'><dt id='h0e4L'><q id='h0e4L'><span id='h0e4L'><b id='h0e4L'><form id='h0e4L'><ins id='h0e4L'></ins><ul id='h0e4L'></ul><sub id='h0e4L'></sub></form><legend id='h0e4L'></legend><bdo id='h0e4L'><pre id='h0e4L'><center id='h0e4L'></center></pre></bdo></b><th id='h0e4L'></th></span></q></dt></tr></i><div id='h0e4L'><tfoot id='h0e4L'></tfoot><dl id='h0e4L'><fieldset id='h0e4L'></fieldset></dl></div>
        <bdo id='h0e4L'></bdo><ul id='h0e4L'></ul>
    1. <tfoot id='h0e4L'></tfoot>

        <small id='h0e4L'></small><noframes id='h0e4L'>

      1. URL重写-重写代码

        URL rewriting-code for rewriting(URL重写-重写代码)

            <small id='QrbNo'></small><noframes id='QrbNo'>

            <i id='QrbNo'><tr id='QrbNo'><dt id='QrbNo'><q id='QrbNo'><span id='QrbNo'><b id='QrbNo'><form id='QrbNo'><ins id='QrbNo'></ins><ul id='QrbNo'></ul><sub id='QrbNo'></sub></form><legend id='QrbNo'></legend><bdo id='QrbNo'><pre id='QrbNo'><center id='QrbNo'></center></pre></bdo></b><th id='QrbNo'></th></span></q></dt></tr></i><div id='QrbNo'><tfoot id='QrbNo'></tfoot><dl id='QrbNo'><fieldset id='QrbNo'></fieldset></dl></div>
          1. <legend id='QrbNo'><style id='QrbNo'><dir id='QrbNo'><q id='QrbNo'></q></dir></style></legend>

                <tbody id='QrbNo'></tbody>

            • <tfoot id='QrbNo'></tfoot>

                  <bdo id='QrbNo'></bdo><ul id='QrbNo'></ul>
                  本文介绍了URL重写-重写代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在为一个网站工作,这是在 php 中.....我想重写 url

                  i am working for a site,which is in php.....i want to rewrite url

                  e.g www.3idiots.co.in/stories.php?id=17
                  

                  如果我想重写它

                  www.3idiots.co.in/stories/17.html

                  谁能告诉我在.htaccess文件中写入的代码.

                  can any one tell me the code for this to write in .htaccess file.?

                  推荐答案

                  我假设您正在使用带有 mod_rewrite 的 Apache.类似的东西

                  I'm assuming you're using Apache with mod_rewrite. Something like

                  RewriteEngine On
                  RewriteRule ^/stories/([0-9]+).html /stories.php?id=$1
                  

                  应该可以解决问题.当然,您需要确保该目录中允许使用 RewriteRule.有关详细信息,请参阅此维基页面.

                  should do the trick. Of course you'll need to make sure that RewriteRule is allowed in that directory. See this wiki page for more information.

                  这篇关于URL重写-重写代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)

                        <tbody id='Tn9ig'></tbody>
                        <legend id='Tn9ig'><style id='Tn9ig'><dir id='Tn9ig'><q id='Tn9ig'></q></dir></style></legend>

                        <i id='Tn9ig'><tr id='Tn9ig'><dt id='Tn9ig'><q id='Tn9ig'><span id='Tn9ig'><b id='Tn9ig'><form id='Tn9ig'><ins id='Tn9ig'></ins><ul id='Tn9ig'></ul><sub id='Tn9ig'></sub></form><legend id='Tn9ig'></legend><bdo id='Tn9ig'><pre id='Tn9ig'><center id='Tn9ig'></center></pre></bdo></b><th id='Tn9ig'></th></span></q></dt></tr></i><div id='Tn9ig'><tfoot id='Tn9ig'></tfoot><dl id='Tn9ig'><fieldset id='Tn9ig'></fieldset></dl></div>

                        <small id='Tn9ig'></small><noframes id='Tn9ig'>

                          • <bdo id='Tn9ig'></bdo><ul id='Tn9ig'></ul>
                            <tfoot id='Tn9ig'></tfoot>